conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
>>>>>>> |
<<<<<<<
INotebookServer,
=======
INotebookProvider,
>>>>>>>
INotebookProvider,
INotebookServer, |
<<<<<<<
=======
const rewireConsole = false;
>>>>>>>
<<<<<<<
// rewireConsole = true;
=======
//rewireConsole = true;
>>>>>>> |
<<<<<<<
import * as utils from '../../shared/utils';
=======
import * as utils from '../utils/utils';
import * as m3u from '../utils/utils-m3u';
>>>>>>>
import * as utils from '../../shared/utils';
import * as m3u from '../utils/utils-m3u'; |
<<<<<<<
return variableLengthCompare(a, b) * -1;
=======
return getVariableCharacters(a).length >= getVariableCharacters(b).length ? -1 : 1;
>>>>>>>
return variableLengthCompare(a, b) * -1;
<<<<<<<
=======
function shuffleCompare(): number {
return Math.random() >= 0.5 ? 1 : -1;
}
>>>>>>>
function shuffleCompare(): number {
return Math.random() >= 0.5 ? 1 : -1;
} |
<<<<<<<
while (!args.endpoint || args.endpoint.length == 0) {
args.endpoint = readline.question(`What localhost endpoint does your bot use for debugging [Example: http://localhost:3978/api/messages]? `, {
defaultInput: ' '
=======
while (!args.endpoint || args.endpoint.length === 0) {
args.endpoint = readline.question(`What endpoint does your bot use for debugging [Example: http://localhost:3978/api/messages]? `, {
defaultInput: `http://localhost:3978/api/messages`
>>>>>>>
while (!args.endpoint || args.endpoint.length === 0) {
args.endpoint = readline.question(`What localhost endpoint does your bot use for debugging [Example: http://localhost:3978/api/messages]? `, {
defaultInput: ' '
<<<<<<<
if (validurl.isHttpUri(args.endpoint) || validurl.isHttpsUri(args.endpoint)) {
if (!args.appId || args.appId.length == 0) {
const answer = readline.question(`Do you have an appId for endpoint? [no] `, {
defaultInput: 'no'
=======
if (!args.appId || args.appId.length === 0) {
const answer: string = readline.question(`Do you have an appId for endpoint? [no] `, {
defaultInput: 'no'
});
if (answer === 'y' || answer === 'yes') {
args.appId = readline.question(`What is your appId for ${args.endpoint}? [none] `, {
defaultInput: ''
>>>>>>>
if (validurl.isHttpUri(args.endpoint) || validurl.isHttpsUri(args.endpoint)) {
if (!args.appId || args.appId.length === 0) {
const answer = readline.question(`Do you have an appId for endpoint? [no] `, {
defaultInput: 'no'
<<<<<<<
while (args.appId && args.appId.length > 0 && (!args.appPassword || args.appPassword.length == 0)) {
args.appPassword = readline.question(`What is your appPassword for ${args.endpoint}? `, {
defaultInput: ''
});
}
=======
while (args.appId && args.appId.length > 0 && (!args.appPassword || args.appPassword.length === 0)) {
args.appPassword = readline.question(`What is your appPassword for ${args.endpoint}? `, {
defaultInput: ''
});
>>>>>>>
while (args.appId && args.appId.length > 0 && (!args.appPassword || args.appPassword.length === 0)) {
args.appPassword = readline.question(`What is your appPassword for ${args.endpoint}? `, {
defaultInput: ''
});
} |
<<<<<<<
import { BotConfiguration, IQnAService, QnaMakerService } from 'botframework-config';
=======
// tslint:disable:no-console
>>>>>>>
// tslint:disable:no-console
import { BotConfiguration, IQnAService, QnaMakerService } from 'botframework-config'; |
<<<<<<<
reconnectRepl("clj", cljSession);
=======
>>>>>>>
reconnectRepl("clj", cljSession);
<<<<<<<
let err = [];
let out = [];
let result = newCljsSession.eval(initCode, { stdout: x => { out.push(util.stripAnsi(x)); chan.append(util.stripAnsi(x)) }, stderr: x => { err.push(util.stripAnsi(x)); chan.append(util.stripAnsi(x))} });
let valueResult = await result.value
state.cursor.set('cljs', cljsSession = newCljsSession)
if(!shadowBuild && result.ns){
=======
let valueResult = await result.value
if (!shadowBuild && result.ns) {
>>>>>>>
let err = [];
let out = [];
let result = newCljsSession.eval(initCode, { stdout: x => { out.push(util.stripAnsi(x)); chan.append(util.stripAnsi(x)) }, stderr: x => { err.push(util.stripAnsi(x)); chan.append(util.stripAnsi(x))} });
let valueResult = await result.value
state.cursor.set('cljs', cljsSession = newCljsSession)
if(!shadowBuild && result.ns){
<<<<<<<
else {
state.cursor.set('cljs', newCljsSession)
return [newCljsSession, null];
=======
else {
state.cursor.set('cljs', cljsSession)
return [cljsSession, null];
>>>>>>>
else {
state.cursor.set('cljs', cljsSession)
return [cljsSession, null]; |
<<<<<<<
=======
import { saveAs } from 'file-saver';
>>>>>>>
<<<<<<<
=======
// This method has been adapted from Stack Overflow
// Question: http://stackoverflow.com/questions/35368633/angular-2-download-pdf-from-api-and-display-it-in-view
// Answer by spock: http://stackoverflow.com/users/435743/spock
>>>>>>>
<<<<<<<
// Track instal event
this.googleAnalyticsEventsService.emitEvent("App", "Install", app.flatpakAppId);
=======
// Track event
this.googleAnalyticsEventsService.emitEvent('App', 'Install', app.flatpakAppId);
// Xhr creates new context so we need to create reference to this
const self = this;
// Status flag used in the template.
this.pending = true;
// Create the Xhr request object
const xhr = new XMLHttpRequest();
const url = this.app.downloadFlatpakRefUrl;
xhr.open('GET', url, true);
xhr.responseType = 'blob';
// Xhr callback when we get a result back
// We are not using arrow function because we need the 'this' context
xhr.onreadystatechange = function () {
// We use setTimeout to trigger change detection in Zones
setTimeout(() => { self.pending = false; }, 0);
// If we get an HTTP status OK (200), save the file using fileSaver
if (xhr.readyState === 4 && xhr.status === 200) {
const blob = new Blob([this.response], { type: 'application/vnd.flatpak.ref' });
const filename: string = url.substring(url.lastIndexOf('/') + 1);
saveAs(blob, filename);
}
};
// Start the Ajax request
xhr.send();
>>>>>>>
// Track instal event
this.googleAnalyticsEventsService.emitEvent('App', 'Install', app.flatpakAppId); |
<<<<<<<
| 'interestDepositForm'
| 'interestWithdrawalForm'
=======
| 'linkedCards'
>>>>>>>
| 'interestDepositForm'
| 'interestWithdrawalForm'
| 'linkedCards' |
<<<<<<<
SDDEligibleType,
SDDVerifiedType,
=======
SwapQuoteType,
>>>>>>>
SDDEligibleType,
SDDVerifiedType,
SwapQuoteType, |
<<<<<<<
| InitalizeDepositModalAction
| InitializeInterestAction
=======
| InitializeInterestAction
| SetInterestStep
| ShowInterestModal
>>>>>>>
| InitalizeDepositModalAction
| InitializeInterestAction
| SetInterestStep
| ShowInterestModal |
<<<<<<<
CustodialProductType,
=======
NabuCustodialProductType,
PaymentDepositPendingResponseType,
>>>>>>>
CustodialProductType,
NabuCustodialProductType,
PaymentDepositPendingResponseType,
<<<<<<<
withdrawFunds,
getWithdrawalFees
=======
notifyNonCustodialToCustodialTransfer,
withdrawFunds
>>>>>>>
getWithdrawalFees
notifyNonCustodialToCustodialTransfer,
withdrawFunds |
<<<<<<<
//Blockchain Loader is done
export const BlockchainLoader: StatelessComponent<{
width?: string
height?: string
}>
//Button is done
export const Button: StatelessComponent<{
nature?:
| 'copy'
| 'dark'
| 'empty-secondary'
| 'empty'
| 'gray-3'
| 'green'
| 'light'
| 'primary'
| 'purple'
| 'received'
| 'secondary'
| 'sent'
| 'success'
| 'transferred'
| 'warning'
| 'white-transparent'
fullwidth?: boolean
disabled?: boolean
rounded?: boolean
bold?: boolean
small?: boolean
uppercase?: boolean
capitalize?: boolean
width?: string
padding?: string
margin?: string
jumbo?: boolean
height?: string
className?: string
onClick?: Function
style?: object
}>
//Done
export const FontGlobalStyles: StatelessComponent<{}>
//done
export const Icon: StatelessComponent<{
name?: keyof IcoMoonType
weight?: number
size?: string
curson?: boolean
color?: string
style?: object
}>
//done
export const IconGlobalStyles: StatelessComponent<{}>
//done
export const Image: StatelessComponent<{
name?: string
width?: string
height?: string
color?: string
size?: string
}>
//done
export const Link: StatelessComponent<{
weight?: number
size?: string
color?: keyof DefaultTheme
uppercase?: boolean
capitalize?: boolean
bold?: boolean
href?: string
target?: string
rel?: string
style?: object
}>
export const Modal: StatelessComponent<{
size?: '' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'
position?: number
total?: number
width?: number
isLast?: boolean
dataE2e?: string
}>
export const ModalBody: StatelessComponent<{
loading?: boolean
}>
export const ModalHeader: StatelessComponent<{
closeButton?: boolean
//this is supposed to be a function
onClose?: any
icon?: keyof IcoMoonType
}>
=======
export function BlockchainLoader(...args: any): any
export function Button(...args: any): any
export function ComponentDropdown(...args): any
export function FontGlobalStyles(...args: any): any
export function Icon(...args: any): any
export function IconGlobalStyles(...args: any): any
export function Image(...args: any): any
export function Link(...args: any): any
export function Modal(...args: any): any
export function ModalBody(...args: any): any
export function ModalHeader(...args: any): any
>>>>>>>
export const BlockchainLoader: StatelessComponent<{
width?: string
height?: string
}>
export const Button: StatelessComponent<{
nature?:
| 'copy'
| 'dark'
| 'empty-secondary'
| 'empty'
| 'gray-3'
| 'green'
| 'light'
| 'primary'
| 'purple'
| 'received'
| 'secondary'
| 'sent'
| 'success'
| 'transferred'
| 'warning'
| 'white-transparent'
fullwidth?: boolean
disabled?: boolean
rounded?: boolean
bold?: boolean
small?: boolean
uppercase?: boolean
capitalize?: boolean
width?: string
padding?: string
margin?: string
jumbo?: boolean
height?: string
className?: string
onClick?: Function
style?: object
}>
export const FontGlobalStyles: StatelessComponent<{}>
export const Icon: StatelessComponent<{
name?: keyof IcoMoonType
weight?: number
size?: string
curson?: boolean
color?: string
style?: object
}>
export const IconGlobalStyles: StatelessComponent<{}>
export const Image: StatelessComponent<{
name?: string
width?: string
height?: string
color?: string
size?: string
}>
export const Link: StatelessComponent<{
weight?: number
size?: string
color?: keyof DefaultTheme
uppercase?: boolean
capitalize?: boolean
bold?: boolean
href?: string
target?: string
rel?: string
style?: object
}>
export const Modal: StatelessComponent<{
size?: '' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'
position?: number
total?: number
width?: number
isLast?: boolean
dataE2e?: string
}>
export const ModalBody: StatelessComponent<{
loading?: boolean
}>
export const ModalHeader: StatelessComponent<{
closeButton?: boolean
onClose?: () => void
icon?: keyof IcoMoonType
}>
<<<<<<<
capitazlie?: boolean
italic?: boolean
altFont?: boolean
cursor?: string
opacity?: string
//display - flexrow or block?
//font family
// cursor
=======
onClick?: () => void
>>>>>>>
capitazlie?: boolean
italic?: boolean
altFont?: boolean
cursor?: string
opacity?: string |
<<<<<<<
export const INTIALIZE_DEPOSIT_MODAL = '@EVENT.INTIALIZE_DEPOSIT_MODAL'
=======
export const SHOW_INTEREST_MODAL = '@EVENT.SHOW_INTEREST_MODAL'
export const SET_INTEREST_STEP = '@EVENT.SET_INTEREST_STEP'
>>>>>>>
export const INTIALIZE_DEPOSIT_MODAL = '@EVENT.INTIALIZE_DEPOSIT_MODAL'
export const SHOW_INTEREST_MODAL = '@EVENT.SHOW_INTEREST_MODAL'
export const SET_INTEREST_STEP = '@EVENT.SET_INTEREST_STEP' |
<<<<<<<
export const SET_FAST_LINK = '@EVENT.SET_FAST_LINK'
export const SET_FIAT_CURRENCY = '@EVENT.SET_FIAT_CURRENCY'
=======
>>>>>>>
export const SET_FIAT_CURRENCY = '@EVENT.SET_FIAT_CURRENCY' |
<<<<<<<
.map(x => ({ ...x.XLM, address: accountAddress.data }))
=======
.map(
x =>
x.XLM && {
...x.XLM,
address: accountAddress ? accountAddress.data : null
}
)
>>>>>>>
.map(x => ({
...x.XLM,
address: accountAddress ? accountAddress.data : null
})) |
<<<<<<<
export * from './modals/types'
export * from 'blockchain-wallet-v4/src'
=======
>>>>>>>
export * from './modals/types' |
<<<<<<<
sddEligable: Remote.NotAsked,
step: 'CURRENCY_SELECTION'
=======
step: 'CRYPTO_SELECTION'
>>>>>>>
sddEligable: Remote.NotAsked,
step: 'CRYPTO_SELECTION' |
<<<<<<<
switch (coin) {
=======
switch (ownProps.coin) {
case 'BCH':
return selectors.core.common.bch.getAccountsBalances(state)
>>>>>>>
switch (coin) {
case 'BCH':
addressDataR = getBchAddressData(state, {
excludeLockbox: true,
excludeImported: true,
includeCustodial: includeCustodial,
includeInterest: false,
includeAll: false
})
break
<<<<<<<
addressDataR = getErc20AddressData(state, {
coin: 'PAX',
includeCustodial: includeCustodial,
includeInterest: false
})
break
=======
>>>>>>>
addressDataR = getErc20AddressData(state, {
coin: 'PAX',
includeCustodial: includeCustodial,
includeInterest: false
})
break
<<<<<<<
addressDataR = getErc20AddressData(state, {
coin: 'USDT',
includeCustodial: includeCustodial,
includeInterest: false
})
break
=======
return selectors.core.common.eth.getErc20AccountBalances(
state,
ownProps.coin
)
case 'XLM':
return selectors.core.common.xlm.getAccountBalances(state)
>>>>>>>
addressDataR = getErc20AddressData(state, {
coin: 'USDT',
includeCustodial: includeCustodial,
includeInterest: false
})
break
case 'XLM':
addressDataR = getXlmAddressData(state, {
excludeLockbox: true,
includeCustodial: includeCustodial,
includeInterest: false
})
break |
<<<<<<<
.map(x => ({ ...x.ETH, address: accountAddress.data }))
=======
.map(
x =>
x.ETH && {
...x.ETH,
address: accountAddress ? accountAddress.data : null
}
)
>>>>>>>
.map(x => ({
...x.ETH,
address: accountAddress ? accountAddress.data : null
}))
<<<<<<<
.map(x => ({ ...x[coin], address: accountAddress.data }))
=======
.map(
x =>
x[coin] && {
...x[coin],
address: accountAddress ? accountAddress.data : null
}
)
>>>>>>>
.map(x => ({
...x[coin],
address: accountAddress ? accountAddress.data : null
})) |
<<<<<<<
const emailVerifiedR = selectors.core.settings.getEmailVerified(state)
const sbOrdersR = selectors.components.simpleBuy.getSBOrders(state)
const sddEligibleR = selectors.components.simpleBuy.getSddEligible(state)
// checks orderType on state for the 'SELL' button on top of actitivity feed
=======
// checks orderType on state for the 'SELL' button on top of activity feed
>>>>>>>
const emailVerifiedR = selectors.core.settings.getEmailVerified(state)
const sbOrdersR = selectors.components.simpleBuy.getSBOrders(state)
const sddEligibleR = selectors.components.simpleBuy.getSddEligible(state)
// checks orderType on state for the 'SELL' button on top of activity feed |
<<<<<<<
const result = await reducer(beforeMiddleswaresResult, ...params);
if (result === false) {
PLATFORM.performance.clearMarks();
PLATFORM.performance.clearMeasures();
=======
const apply = async (newState: T) => {
let resultingState = await this.executeMiddlewares(
newState,
MiddlewarePlacement.After,
{
name: action!.name,
params
}
);
>>>>>>>
const result = await reducer(beforeMiddleswaresResult, ...params);
if (result === false) {
PLATFORM.performance.clearMarks();
PLATFORM.performance.clearMeasures();
<<<<<<<
private executeMiddlewares(state: T, placement: MiddlewarePlacement): T | false {
=======
private executeMiddlewares(state: T, placement: MiddlewarePlacement, action: CallingAction): T {
>>>>>>>
private executeMiddlewares(state: T, placement: MiddlewarePlacement, action: CallingAction): T | false {
<<<<<<<
const result = await curr[0](await prev, this._state.getValue(), curr[1].settings);
if (result === false) {
_arr = [];
return false;
}
=======
const result = await curr[0](await prev, this._state.getValue(), curr[1].settings, action);
>>>>>>>
const result = await curr[0](await prev, this._state.getValue(), curr[1].settings, action);
if (result === false) {
_arr = [];
return false;
} |
<<<<<<<
export * from '../network/api/sdd/types'
=======
export * from '../network/api/swap/types'
>>>>>>>
export * from '../network/api/sdd/types'
export * from '../network/api/swap/types' |
<<<<<<<
=======
rates: ExtractSuccess<typeof ratesR>,
>>>>>>>
rates: ExtractSuccess<typeof ratesR>,
<<<<<<<
=======
payment: paymentR.getOrElse(undefined),
rates,
>>>>>>>
rates,
<<<<<<<
)(
cardsR,
quoteR,
sbBalancesR,
userDataR,
sddEligibleR,
sddLimitR,
supportedCoinsR,
userSDDTierR
)
=======
)(quoteR, ratesR, sbBalancesR, userDataR, supportedCoinsR)
>>>>>>>
)(
cardsR,
quoteR,
ratesR,
sbBalancesR,
userDataR,
sddEligibleR,
sddLimitR,
supportedCoinsR,
userSDDTierR
) |
<<<<<<<
import { call, CallEffect, put, select } from 'redux-saga/effects'
import { head, nth } from 'ramda'
=======
import { call, put, select } from 'redux-saga/effects'
>>>>>>>
import { call, put, select } from 'redux-saga/effects'
import { head, nth } from 'ramda'
<<<<<<<
import {
INVALID_COIN_TYPE,
NO_DEFAULT_ACCOUNT
} from 'blockchain-wallet-v4/src/model'
import { promptForSecondPassword } from 'services/SagaService'
=======
import { INVALID_COIN_TYPE } from 'blockchain-wallet-v4/src/model'
>>>>>>>
import {
INVALID_COIN_TYPE,
NO_DEFAULT_ACCOUNT
} from 'blockchain-wallet-v4/src/model'
<<<<<<<
const paymentGetOrElse = (
coin: CoinType,
paymentR: RemoteDataType<string | Error, PaymentValue | undefined>
): PaymentType => {
switch (coin) {
case 'BCH':
return coreSagas.payment.bch.create({
payment: paymentR.getOrElse(<PaymentValue>{}),
network: networks.bch
})
case 'BTC':
return coreSagas.payment.btc.create({
payment: paymentR.getOrElse(<PaymentValue>{}),
network: networks.btc
})
case 'ETH':
case 'PAX':
case 'USDT':
return coreSagas.payment.eth.create({
payment: paymentR.getOrElse(<PaymentValue>{}),
network: networks.eth
})
case 'XLM':
return coreSagas.payment.xlm.create({
payment: paymentR.getOrElse(<PaymentValue>{})
})
default:
throw new Error(INVALID_COIN_TYPE)
}
}
const getDefaultAccountForCoin = function * (coin: CoinType) {
let defaultAccountR
switch (coin) {
case 'BCH':
const bchAccountsR = yield select(
selectors.core.common.bch.getAccountsBalances
)
const bchDefaultIndex = (yield select(
selectors.core.kvStore.bch.getDefaultAccountIndex
)).getOrElse(0)
defaultAccountR = bchAccountsR.map(nth(bchDefaultIndex))
break
case 'BTC':
const btcAccountsR = yield select(
selectors.core.common.btc.getAccountsBalances
)
const btcDefaultIndex = yield select(
selectors.core.wallet.getDefaultAccountIndex
)
defaultAccountR = btcAccountsR.map(nth(btcDefaultIndex))
break
case 'ETH':
const ethAccountR = yield select(
selectors.core.common.eth.getAccountBalances
)
defaultAccountR = ethAccountR.map(head)
break
case 'PAX':
case 'USDT':
const erc20AccountR = yield select(
selectors.core.common.eth.getErc20AccountBalances,
coin
)
defaultAccountR = erc20AccountR.map(head)
break
case 'XLM':
defaultAccountR = (yield select(
selectors.core.common.xlm.getAccountBalances
)).map(head)
break
default:
throw new Error('Invalid Coin Type')
}
return defaultAccountR.getOrFail(NO_DEFAULT_ACCOUNT)
}
const getReceiveAddressForCoin = function * (coin: CoinType) {
switch (coin) {
case 'BCH':
return selectors.core.common.bch
.getNextAvailableReceiveAddress(
networks.bch,
(yield select(
selectors.core.kvStore.bch.getDefaultAccountIndex
)).getOrFail(),
yield select()
)
.getOrFail('Failed to get BCH receive address')
case 'BTC':
return selectors.core.common.btc
.getNextAvailableReceiveAddress(
networks.btc,
yield select(selectors.core.wallet.getDefaultAccountIndex),
yield select()
)
.getOrFail('Failed to get BTC receive address')
case 'ETH':
case 'PAX':
case 'USDT':
return selectors.core.data.eth
.getDefaultAddress(yield select())
.getOrFail(`Failed to get ${coin} receive address`)
case 'XLM':
return selectors.core.kvStore.xlm
.getDefaultAccountId(yield select())
.getOrFail(`Failed to get XLM receive address`)
default:
throw new Error('Invalid Coin Type')
}
}
=======
>>>>>>>
const getDefaultAccountForCoin = function * (coin: CoinType) {
let defaultAccountR
switch (coin) {
case 'BCH':
const bchAccountsR = yield select(
selectors.core.common.bch.getAccountsBalances
)
const bchDefaultIndex = (yield select(
selectors.core.kvStore.bch.getDefaultAccountIndex
)).getOrElse(0)
defaultAccountR = bchAccountsR.map(nth(bchDefaultIndex))
break
case 'BTC':
const btcAccountsR = yield select(
selectors.core.common.btc.getAccountsBalances
)
const btcDefaultIndex = yield select(
selectors.core.wallet.getDefaultAccountIndex
)
defaultAccountR = btcAccountsR.map(nth(btcDefaultIndex))
break
case 'ETH':
const ethAccountR = yield select(
selectors.core.common.eth.getAccountBalances
)
defaultAccountR = ethAccountR.map(head)
break
case 'PAX':
case 'USDT':
const erc20AccountR = yield select(
selectors.core.common.eth.getErc20AccountBalances,
coin
)
defaultAccountR = erc20AccountR.map(head)
break
case 'XLM':
defaultAccountR = (yield select(
selectors.core.common.xlm.getAccountBalances
)).map(head)
break
default:
throw new Error('Invalid Coin Type')
}
return defaultAccountR.getOrFail(NO_DEFAULT_ACCOUNT)
}
const getReceiveAddressForCoin = function * (coin: CoinType) {
switch (coin) {
case 'BCH':
return selectors.core.common.bch
.getNextAvailableReceiveAddress(
networks.bch,
(yield select(
selectors.core.kvStore.bch.getDefaultAccountIndex
)).getOrFail(),
yield select()
)
.getOrFail('Failed to get BCH receive address')
case 'BTC':
return selectors.core.common.btc
.getNextAvailableReceiveAddress(
networks.btc,
yield select(selectors.core.wallet.getDefaultAccountIndex),
yield select()
)
.getOrFail('Failed to get BTC receive address')
case 'ETH':
case 'PAX':
case 'USDT':
return selectors.core.data.eth
.getDefaultAddress(yield select())
.getOrFail(`Failed to get ${coin} receive address`)
case 'XLM':
return selectors.core.kvStore.xlm
.getDefaultAccountId(yield select())
.getOrFail(`Failed to get XLM receive address`)
default:
throw new Error('Invalid Coin Type')
}
}
<<<<<<<
createPayment,
getDefaultAccountForCoin,
getReceiveAddressForCoin,
paymentGetOrElse
=======
createPayment
>>>>>>>
createPayment,
getDefaultAccountForCoin,
getReceiveAddressForCoin |
<<<<<<<
...coinify({ coinifyUrl, ...http }),
...delegate({ rootUrl, apiUrl, ...http }),
...eth({ apiUrl, ...http }),
=======
...eth({ rootUrl, apiUrl, ...http }),
>>>>>>>
...eth({ apiUrl, ...http }), |
<<<<<<<
interface InputOutput {
id: number
address_hash: string
capacity: number
from_cellbase: boolean
target_block_number: number
block_reward: number
secondary_reward: number
commit_reward: number
proposal_reward: number
isGenesisOutput: boolean
}
=======
>>>>>>> |
<<<<<<<
}
export const fetchStatisticTxFeeHistory = () => {
return axiosIns(`/daily_statistics/total_tx_fee`).then((res: AxiosResponse) =>
toCamelcase<Response.Response<Response.Wrapper<State.StatisticTransactionFee>[]>>(res.data),
)
}
export const fetchStatisticBlockTimeDistribution = () => {
return axiosIns(`/distribution_data/block_time_distribution`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.StatisticBlockTimeDistributions>>(res.data.data),
)
}
export const fetchStatisticOccupiedCapacity = () => {
return axiosIns(`/daily_statistics/occupied_capacity`).then((res: AxiosResponse) =>
toCamelcase<Response.Response<Response.Wrapper<State.StatisticOccupiedCapacity>[]>>(res.data),
)
}
export const fetchStatisticEpochTimeDistribution = () => {
return axiosIns(`/distribution_data/epoch_time_distribution`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.StatisticEpochTimeDistributions>>(res.data.data),
)
}
export const fetchStatisticEpochLengthDistribution = () => {
return axiosIns(`/distribution_data/epoch_length_distribution`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.StatisticEpochLengthDistributions>>(res.data.data),
)
=======
}
export const fetchSimpleUDT = (typeHash: string) => {
return axiosIns(`/udts/${typeHash}`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.UDT>>(res.data.data),
)
}
export const fetchSimpleUDTTransactions = (typeHash: string, page: number, size: number) => {
return axiosIns(`/udt_transactions/${typeHash}`, {
params: {
page,
page_size: size,
},
}).then((res: AxiosResponse) => toCamelcase<Response.Response<Response.Wrapper<State.Transaction>[]>>(res.data))
}
export const fetchSimpleUDTTransactionsWithAddress = (
address: string,
typeHash: string,
page: number,
size: number,
) => {
return axiosIns(`/address_udt_transactions/${address}`, {
params: {
type_hash: typeHash,
page,
page_size: size,
},
}).then((res: AxiosResponse) => toCamelcase<Response.Response<Response.Wrapper<State.Transaction>[]>>(res.data))
>>>>>>>
}
export const fetchStatisticTxFeeHistory = () => {
return axiosIns(`/daily_statistics/total_tx_fee`).then((res: AxiosResponse) =>
toCamelcase<Response.Response<Response.Wrapper<State.StatisticTransactionFee>[]>>(res.data),
)
}
export const fetchStatisticBlockTimeDistribution = () => {
return axiosIns(`/distribution_data/block_time_distribution`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.StatisticBlockTimeDistributions>>(res.data.data),
)
}
export const fetchStatisticOccupiedCapacity = () => {
return axiosIns(`/daily_statistics/occupied_capacity`).then((res: AxiosResponse) =>
toCamelcase<Response.Response<Response.Wrapper<State.StatisticOccupiedCapacity>[]>>(res.data),
)
}
export const fetchStatisticEpochTimeDistribution = () => {
return axiosIns(`/distribution_data/epoch_time_distribution`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.StatisticEpochTimeDistributions>>(res.data.data),
)
}
export const fetchStatisticEpochLengthDistribution = () => {
return axiosIns(`/distribution_data/epoch_length_distribution`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.StatisticEpochLengthDistributions>>(res.data.data),
)
}
export const fetchSimpleUDT = (typeHash: string) => {
return axiosIns(`/udts/${typeHash}`).then((res: AxiosResponse) =>
toCamelcase<Response.Wrapper<State.UDT>>(res.data.data),
)
}
export const fetchSimpleUDTTransactions = (typeHash: string, page: number, size: number) => {
return axiosIns(`/udt_transactions/${typeHash}`, {
params: {
page,
page_size: size,
},
}).then((res: AxiosResponse) => toCamelcase<Response.Response<Response.Wrapper<State.Transaction>[]>>(res.data))
}
export const fetchSimpleUDTTransactionsWithAddress = (
address: string,
typeHash: string,
page: number,
size: number,
) => {
return axiosIns(`/address_udt_transactions/${address}`, {
params: {
type_hash: typeHash,
page,
page_size: size,
},
}).then((res: AxiosResponse) => toCamelcase<Response.Response<Response.Wrapper<State.Transaction>[]>>(res.data)) |
<<<<<<<
import * as ReactDOM from 'react-dom';
import * as Backbone from 'backbone';
=======
>>>>>>>
import * as ReactDOM from 'react-dom'; |
<<<<<<<
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { File, FileEntry } from '@ionic-native/file';
=======
import { Injectable } from '@angular/core';
import { File, FileEntry } from '@ionic-native/file';
import { HttpClient } from '@angular/common/http';
>>>>>>>
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { File, FileEntry } from '@ionic-native/file';
<<<<<<<
// function to call when done processing this item
// this will reduce the processing number
// then will execute this function again to process any remaining items
const done = () => {
this.processing--;
this.processQueue();
if (this.currentlyProcessing[currentItem.imageUrl] !== undefined) {
delete this.currentlyProcessing[currentItem.imageUrl];
}
};
const error = (e) => {
currentItem.reject();
this.throwError(e);
done();
};
const localDir = this.getFileCacheDirectory() + this.config.cacheDirectoryName + '/';
=======
const localDir = this.file.cacheDirectory + this.config.cacheDirectoryName + '/';
>>>>>>>
const localDir = this.getFileCacheDirectory() + this.config.cacheDirectoryName + '/';
<<<<<<<
});
},
);
=======
reject(e);
}
);
});
>>>>>>>
reject(e);
});
},
);
<<<<<<<
});
=======
});
done();
},
(e) => {
error(e);
>>>>>>>
});
done();
},
(e) => {
error(e); |
<<<<<<<
logger.log(
chalk.grey(`Building Lambda function ${getHandlerCopy(srcPath, handler)}`)
=======
console.log(
chalk.grey(
`Building Lambda function ${getHandlerFullPosixPath(srcPath, handler)}`
)
>>>>>>>
logger.log(
chalk.grey(
`Building Lambda function ${getHandlerFullPosixPath(srcPath, handler)}`
) |
<<<<<<<
import {
Observable,
BehaviorSubject,
Subscriber,
Subscription,
Observer
} from "rxjs";
=======
/**
* @license BSD-3-Clause
*
* Copyright (c) 2019 Project Jupyter Contributors.
* Distributed under the terms of the 3-Clause BSD License.
*/
import { Observable, BehaviorSubject, Subscriber, Subscription } from "rxjs";
export const NOT_SUBSCRIBED = Symbol("NOT_SUBSCRIBED");
export const COMPLETE = Symbol("COMPLETE");
export const NO_VALUE = Symbol("NO_VALUE");
export const NOT_FINAL = Symbol("NOT_FINAL");
>>>>>>>
/**
* @license BSD-3-Clause
*
* Copyright (c) 2019 Project Jupyter Contributors.
* Distributed under the terms of the 3-Clause BSD License.
*/
import {
Observable,
BehaviorSubject,
Subscriber,
Subscription,
Observer
} from "rxjs"; |
<<<<<<<
ja: '言語を選択してください。',
=======
ro: 'Te rog, salectează limba.',
>>>>>>>
ja: '言語を選択してください。',
ro: 'Te rog, salectează limba.',
<<<<<<<
ja: 'はい、私は日本語が喋れます。',
=======
ro: 'Perfect, acum vorbesc Română.',
>>>>>>>
ja: 'はい、私は日本語が喋れます。',
ro: 'Perfect, acum vorbesc Română.',
<<<<<<<
ja: '最初にメニューを開いた人だけが、選択することができます。',
=======
ro: 'Doar persoana ce a inițiat meniul poate selecta',
>>>>>>>
ja: '最初にメニューを開いた人だけが、選択することができます。',
ro: 'Doar persoana ce a inițiat meniul poate selecta',
<<<<<<<
ja: `新しく参加した人へのテストの種類を選択してください’
• シンプル — botが何か発言してくださいと尋ねます
• ボタン — botがボタンを押してくださいとお願いします
• 数字 — botが簡単な算数の問題を解いてくださいと尋ねます`,
=======
ro: `Selectează tipul de test pentru nou veniți:
• Simplu — bot-ul va cere userului să trimită orice în chat
• Buton — bot-ul va cere userului să apese un buton
• Cifre — bot-ul va cere userului să rezolve o simplă operație aritmetică`,
>>>>>>>
ja: `新しく参加した人へのテストの種類を選択してください’
• シンプル — botが何か発言してくださいと尋ねます
• ボタン — botがボタンを押してくださいとお願いします
• 数字 — botが簡単な算数の問題を解いてくださいと尋ねます`,
ro: `Selectează tipul de test pentru nou veniți:
• Simplu — bot-ul va cere userului să trimită orice în chat
• Buton — bot-ul va cere userului să apese un buton
• Cifre — bot-ul va cere userului să rezolve o simplă operație aritmetică`,
<<<<<<<
ja: '簡単',
=======
ro: 'Simplu',
>>>>>>>
ja: '簡単',
ro: 'Simplu',
<<<<<<<
ja: '数字',
=======
ro: 'Cifre',
>>>>>>>
ja: '数字',
ro: 'Cifre',
<<<<<<<
ja: 'ボタン',
=======
ro: 'Buton',
>>>>>>>
ja: 'ボタン',
ro: 'Buton',
<<<<<<<
ja: 'はい、このタイプのテストを使います。',
=======
ro: 'Perfect, o să utilizez acest tip de test.',
>>>>>>>
ja: 'はい、このタイプのテストを使います。',
ro: 'Perfect, o să utilizez acest tip de test.',
<<<<<<<
ja:
'新しく参加した人が退出させられるまでにテストを完了する時間を何秒間にするかを選択してください。',
=======
ro: 'Te rog selectează câte secunde au la dispoziție userii noi să completeze testul, înainte sa fi dați afară.',
>>>>>>>
ja:
'新しく参加した人が退出させられるまでにテストを完了する時間を何秒間にするかを選択してください。',
ro:
'Te rog selectează câte secunde au la dispoziție userii noi să completeze testul, înainte sa fi dați afară.',
<<<<<<<
ja: 'はい、この時間制限を使います。',
=======
ro: 'Super, o să folosesc această limită de timp',
>>>>>>>
ja: 'はい、この時間制限を使います。',
ro: 'Super, o să folosesc această limită de timp',
<<<<<<<
ja: '秒',
=======
ro: 'sec',
>>>>>>>
ja: '秒',
ro: 'sec',
<<<<<<<
ja: '素晴らしいです!これで管理者によるコマンドしか受け付けません。',
=======
ro: 'Super! Acum o să reacționez doar la comenzile date de către admini.',
>>>>>>>
ja: '素晴らしいです!これで管理者によるコマンドしか受け付けません。',
ro: 'Super! Acum o să reacționez doar la comenzile date de către admini.',
<<<<<<<
ja: '素晴らしいです!これで、誰からのコマンドも受け付けます。',
=======
ro: 'Super! Acum o să reacționez la comenzile trimise de căre oricine. ',
>>>>>>>
ja: '素晴らしいです!これで、誰からのコマンドも受け付けます。',
ro: 'Super! Acum o să reacționez la comenzile trimise de căre oricine. ',
<<<<<<<
ja:
'素晴らしいです!これで、新しく参加した人は、キャプチャをパスするまで、キャプチャの回答しかできません。',
=======
ro: 'Perfect! Acum nou veniții vor putea trimite doar soluții captcha până când trec de testul captcha.',
>>>>>>>
ja:
'素晴らしいです!これで、新しく参加した人は、キャプチャをパスするまで、キャプチャの回答しかできません。',
ro:
'Perfect! Acum nou veniții vor putea trimite doar soluții captcha până când trec de testul captcha.',
<<<<<<<
ja:
'素晴らしいです!、これで、新しく参加した人は、キャプチャをパスする前に、テキストを送信することができます。',
=======
ro: 'Super! Acum nou veniții vor putea trimite text înainte de a trece de testul captcha.',
>>>>>>>
ja:
'素晴らしいです!、これで、新しく参加した人は、キャプチャをパスする前に、テキストを送信することができます。',
ro:
'Super! Acum nou veniții vor putea trimite text înainte de a trece de testul captcha.',
<<<<<<<
ja:
'指定された時間内に何かメッセージを送ってください。そうしないと、退出させられます。ありがとうございます!',
=======
ro: ', te rog, trimite orice mesaj către acest grup în timpul specificat, altfel o să fii dat afară în mod automat. Mulțumesc!',
>>>>>>>
ja:
'指定された時間内に何かメッセージを送ってください。そうしないと、退出させられます。ありがとうございます!',
ro:
', te rog, trimite orice mesaj către acest grup în timpul specificat, altfel o să fii dat afară în mod automat. Mulțumesc!',
<<<<<<<
ja:
'指定された時間内に算数の正解を送信してください。そうしないと、退出させられます。ありがとうございます!',
=======
ro: ', te rog, trimite rezultatul operației aritmetice în timpul specificat, altfel o sa fii dat afară din grup în mod automat. Mulțumesc!',
>>>>>>>
ja:
'指定された時間内に算数の正解を送信してください。そうしないと、退出させられます。ありがとうございます!',
ro:
', te rog, trimite rezultatul operației aritmetice în timpul specificat, altfel o sa fii dat afară din grup în mod automat. Mulțumesc!',
<<<<<<<
ja:
'指定された時間内に、下に表示されたボタンを押してください。そうしないと、退出させられます。ありがとうございます!',
=======
ro: ', te rog, apasă butonul de mai jos în timpul spefificat, altfel o să fii dat afară din grup în mod automat. Mulțumesc!',
>>>>>>>
ja:
'指定された時間内に、下に表示されたボタンを押してください。そうしないと、退出させられます。ありがとうございます!',
ro:
', te rog, apasă butonul de mai jos în timpul spefificat, altfel o să fii dat afară din grup în mod automat. Mulțumesc!',
<<<<<<<
ja: '私はbotではありません。',
=======
ro: 'Nu sunt un bot',
>>>>>>>
ja: '私はbotではありません。',
ro: 'Nu sunt un bot',
<<<<<<<
ja: 'botではない候補の人だけがボタンを押すことができます。',
=======
ro: 'Doar candidații ce nu sunt boți pot apăsa acest buton.',
>>>>>>>
ja: 'botではない候補の人だけがボタンを押すことができます。',
ro: 'Doar candidații ce nu sunt boți pot apăsa acest buton.',
<<<<<<<
ja:
'素晴らしいです!これで、全ての新しく参加した人は、このチャットで普通のテキストメッセージを送ることができます。',
=======
ro: 'Perfect! Acum toți nou veniții vor putea trimite orice fel de mesaje text către acest chat. ',
>>>>>>>
ja:
'素晴らしいです!これで、全ての新しく参加した人は、このチャットで普通のテキストメッセージを送ることができます。',
ro:
'Perfect! Acum toți nou veniții vor putea trimite orice fel de mesaje text către acest chat. ',
<<<<<<<
ja:
'素晴らしいです!これで、全ての新しく参加した人は、このチャットでどんな種類のコンテンツを送ることができます。',
=======
ro: 'Perfect! Acum toți nou veniții vor putea trimite orice fel conținut către acest chat.',
>>>>>>>
ja:
'素晴らしいです!これで、全ての新しく参加した人は、このチャットでどんな種類のコンテンツを送ることができます。',
ro:
'Perfect! Acum toți nou veniții vor putea trimite orice fel conținut către acest chat.',
<<<<<<<
ja: '素晴らしいです!これで、全ての参加時のメッセージは削除されます。',
=======
ro: 'Perfect! Acum mesajele de întampinare vor fi șterse.',
>>>>>>>
ja: '素晴らしいです!これで、全ての参加時のメッセージは削除されます。',
ro: 'Perfect! Acum mesajele de întampinare vor fi șterse.',
<<<<<<<
ja: '素晴らしいです!これで、全ての参加時のメッセージは削除されません。',
=======
ro: 'Perfect! Acum mesajele de întampinare nu vor fi șterse.',
>>>>>>>
ja: '素晴らしいです!これで、全ての参加時のメッセージは削除されません。',
ro: 'Perfect! Acum mesajele de întampinare nu vor fi șterse.',
<<<<<<<
ja:
'素晴らしいです!これで、テストをパスして新しく参加した人は挨拶をされます。あなたが希望する挨拶のメッセージを、こちらのメッセージに回答してください。($title and $usernameを使えます。)',
=======
ro:
'Super! Acum nou veniții ce au trecut testul vor fi salutați. Te rog să răspunzi la acest mesaj cu textul salutului pe care vrei sa îl utilizezi (poți folosi $title si $username).',
>>>>>>>
ja:
'素晴らしいです!これで、テストをパスして新しく参加した人は挨拶をされます。あなたが希望する挨拶のメッセージを、こちらのメッセージに回答してください。($title and $usernameを使えます。)',
ro:
'Super! Acum nou veniții ce au trecut testul vor fi salutați. Te rog să răspunzi la acest mesaj cu textul salutului pe care vrei sa îl utilizezi (poți folosi $title si $username).',
<<<<<<<
ja:
'素晴らしいです!これで、テストをパスして新しく参加した人は挨拶をされます。あなたが希望する挨拶のメッセージを、こちらのメッセージに回答してください。($title and $usernameを使えます。) 今の挨拶メッセージは以下です。',
=======
ro:
'Super! Acum nou veniții ce au trecut testul vor fi salutați. Te rog să răspunzi la acest mesaj cu textul salutului pe care vrei sa îl utilizezi (poți folosi $title si $username). Mesajul curent de salut este următorul.',
>>>>>>>
ja:
'素晴らしいです!これで、テストをパスして新しく参加した人は挨拶をされます。あなたが希望する挨拶のメッセージを、こちらのメッセージに回答してください。($title and $usernameを使えます。) 今の挨拶メッセージは以下です。',
ro:
'Super! Acum nou veniții ce au trecut testul vor fi salutați. Te rog să răspunzi la acest mesaj cu textul salutului pe care vrei sa îl utilizezi (poți folosi $title si $username). Mesajul curent de salut este următorul.',
<<<<<<<
ja:
'素晴らしいです!これで、このテストをパスして新しく参加された人は挨拶をされません。',
=======
ro: 'Super! Acum nou veniții ce au trecut testul vor fi salutați.',
>>>>>>>
ja:
'素晴らしいです!これで、このテストをパスして新しく参加された人は挨拶をされません。',
ro: 'Super! Acum nou veniții ce au trecut testul vor fi salutați.',
<<<<<<<
ja: '承認されました!',
=======
ro: 'Acceptat!',
>>>>>>>
ja: '承認されました!',
ro: 'Acceptat!',
<<<<<<<
ja:
'素晴らしいです!これで、新しく参加した人は、キャプチャに説明されたカスタムメッセージを受けます。あなたが希望するキャプチャテキストを、こちらのメッセージに回答してください。($title, $username, $equation and $secondsを使えます)。',
=======
ro:
'Super! Acum nou veniții vor primi un mesaj personalizat ce le explică captcha. Te rog răspunde la acest mesaj cu text-ul testului captcha pe care vrei sa îl folosești (poți utiliza $title, $username, $equation și $seconds).',
>>>>>>>
ja:
'素晴らしいです!これで、新しく参加した人は、キャプチャに説明されたカスタムメッセージを受けます。あなたが希望するキャプチャテキストを、こちらのメッセージに回答してください。($title, $username, $equation and $secondsを使えます)。',
ro:
'Super! Acum nou veniții vor primi un mesaj personalizat ce le explică captcha. Te rog răspunde la acest mesaj cu text-ul testului captcha pe care vrei sa îl folosești (poți utiliza $title, $username, $equation și $seconds).',
<<<<<<<
ja:
'素晴らしいです!これで、新しく参加した人は、キャプチャに説明されたカスタムメッセージを受けます。あなたが希望するキャプチャテキストを、こちらのメッセージに回答してください。($title, $username, $equation and $secondsを使えます)。 今の挨拶メッセージは以下です。',
=======
ro:
'Super! Acum nou veniții vor primi un mesaj personalizat ce le explică captcha. Te rog răspunde la acest mesaj cu text-ul testului captcha pe care vrei sa îl folosești (poți utiliza $title, $username, $equation și $seconds). Mesajul curent de salut este următorul.',
>>>>>>>
ja:
'素晴らしいです!これで、新しく参加した人は、キャプチャに説明されたカスタムメッセージを受けます。あなたが希望するキャプチャテキストを、こちらのメッセージに回答してください。($title, $username, $equation and $secondsを使えます)。 今の挨拶メッセージは以下です。',
ro:
'Super! Acum nou veniții vor primi un mesaj personalizat ce le explică captcha. Te rog răspunde la acest mesaj cu text-ul testului captcha pe care vrei sa îl folosești (poți utiliza $title, $username, $equation și $seconds). Mesajul curent de salut este următorul.',
<<<<<<<
ja:
'素晴らしいです!これで、新しく参加した人は、デフォルトのキャプチャメッセージを見れます。',
=======
ro: 'Minunat! Acum nou veniții vor vedea mesajul captcha implicit',
>>>>>>>
ja:
'素晴らしいです!これで、新しく参加した人は、デフォルトのキャプチャメッセージを見れます。',
ro: 'Minunat! Acum nou veniții vor vedea mesajul captcha implicit',
<<<<<<<
ja: '承認されました!',
=======
ro: 'Acceptat!',
>>>>>>>
ja: '承認されました!',
ro: 'Acceptat!',
<<<<<<<
ja: 'いいですね!キャプチャをパスしなかったユーザーがバンされます。',
=======
ro: 'Nice! Utilizatorii vor fi banați dacă nu trec testul captcha.',
>>>>>>>
ja: 'いいですね!キャプチャをパスしなかったユーザーがバンされます。',
ro: 'Nice! Utilizatorii vor fi banați dacă nu trec testul captcha.',
<<<<<<<
ja: 'いいですね!キャプチャをパスしなかったユーザーは退出させられます。',
=======
ro: 'Nice! Utilizatorii vor primi kick dacă nu trec testul captcha.',
>>>>>>>
ja: 'いいですね!キャプチャをパスしなかったユーザーは退出させられます。',
ro: 'Nice! Utilizatorii vor primi kick dacă nu trec testul captcha.',
<<<<<<<
ja:
'素晴らしいです!Shieldyは、キャプチャを失敗したユーザーの入室時のメッセージを削除します。',
=======
ro:
'Minunat! Shieldy va șterge fiecare mesaj al utilizatorilor ce nu au trecut testul captcha.',
>>>>>>>
ja:
'素晴らしいです!Shieldyは、キャプチャを失敗したユーザーの入室時のメッセージを削除します。',
ro:
'Minunat! Shieldy va șterge fiecare mesaj al utilizatorilor ce nu au trecut testul captcha.',
<<<<<<<
ja:
'素晴らしいです!Shieldyは、キャプチャを失敗したユーザーの入室時のメッセージを削除しません。',
=======
ro:
'Minunat! Shieldy nu va șterge fiecare mesaj al utilizatorilor ce nu au trecut testul captcha.',
>>>>>>>
ja:
'素晴らしいです!Shieldyは、キャプチャを失敗したユーザーの入室時のメッセージを削除しません。',
ro:
'Minunat! Shieldy nu va șterge fiecare mesaj al utilizatorilor ce nu au trecut testul captcha.', |
<<<<<<<
const ROOM_ID_PREANGEL = '17237607145@chatroom' // ChatOps - PreAngel
const ROOM_ID_CHATBOT_0_1 = '22598372108@chatroom' // 博文视点《Chatbot从0到1》读者群
const ROOM_ID_JAVASCRIPT_ML = '4383052528@chatroom' // Machine Learning in JavaScript
=======
const ROOM_ID_PREANGEL = '17237607145@chatroom' // ChatOps - PreAngel
const ROOM_ID_CHATBOT_0_1 = '22598372108@chatroom' // 博文视点《Chatbot从0到1》读者群
const ROOM_ID_WECHATY_CONTRIBUTORS = '6719192413@chatroom' // Wechaty Contributors
const ROOM_ID_SUMMER_OF_CODE = '17817316202@chatroom' // Wechaty ISCAS Code of Summer
>>>>>>>
const ROOM_ID_PREANGEL = '17237607145@chatroom' // ChatOps - PreAngel
const ROOM_ID_CHATBOT_0_1 = '22598372108@chatroom' // 博文视点《Chatbot从0到1》读者群
const ROOM_ID_WECHATY_CONTRIBUTORS = '6719192413@chatroom' // Wechaty Contributors
const ROOM_ID_SUMMER_OF_CODE = '17817316202@chatroom' // Wechaty ISCAS Code of Summer
const ROOM_ID_JAVASCRIPT_ML = '4383052528@chatroom' // Machine Learning in JavaScript
<<<<<<<
'chatie/(blog|*wechaty*)' : ROOM_ID_LIST_WECHATY_DEVELOPER,
'chatie/grpc' : ROOM_ID_LIST_PYTHON_GO_JAVA_WECHATY,
'huan/tensorflow-handbook-javascript' : ROOM_ID_JAVASCRIPT_ML,
'juzibot/donut-tester' : ROOM_ID_LIST_WECHATY_DEVELOPER,
'lijiarui/chatbot-zero-to-one' : ROOM_ID_CHATBOT_0_1,
'preangel/pre-angel.com' : ROOM_ID_PREANGEL,
'wechaty/(python|go|java)-wechaty' : ROOM_ID_LIST_PYTHON_GO_JAVA_WECHATY,
'wechaty/*wechaty*' : ROOM_ID_LIST_WECHATY_DEVELOPER,
'wechaty/bot5.club' : ROOM_ID_LIST_BOT5_CLUB,
'wechaty/friday' : [
...ROOM_ID_LIST_WECHATY_DEVELOPER,
=======
'chatie/(blog|*wechaty*)' : ROOM_ID_LIST_WECHATY_DEVELOPERS,
'chatie/grpc' : ROOM_ID_LIST_PYTHON_GO_JAVA_WECHATY,
'juzibot/donut-tester' : ROOM_ID_LIST_WECHATY_DEVELOPERS,
'lijiarui/chatbot-zero-to-one' : ROOM_ID_CHATBOT_0_1,
'preangel/pre-angel.com' : ROOM_ID_PREANGEL,
'wechaty/(python|go|java|scala)-wechaty*' : ROOM_ID_LIST_PYTHON_GO_JAVA_WECHATY,
'wechaty/*wechaty*' : ROOM_ID_LIST_WECHATY_DEVELOPERS,
'wechaty/PMC' : ROOM_ID_WECHATY_CONTRIBUTORS,
'wechaty/bot5.club' : ROOM_ID_LIST_BOT5_CLUB,
'wechaty/friday' : [
...ROOM_ID_LIST_WECHATY_DEVELOPERS,
>>>>>>>
'chatie/(blog|*wechaty*)' : ROOM_ID_LIST_WECHATY_DEVELOPERS,
'chatie/grpc' : ROOM_ID_LIST_PYTHON_GO_JAVA_WECHATY,
'huan/tensorflow-handbook-javascript' : ROOM_ID_JAVASCRIPT_ML,
'juzibot/donut-tester' : ROOM_ID_LIST_WECHATY_DEVELOPERS,
'lijiarui/chatbot-zero-to-one' : ROOM_ID_CHATBOT_0_1,
'preangel/pre-angel.com' : ROOM_ID_PREANGEL,
'wechaty/(python|go|java|scala)-wechaty*' : ROOM_ID_LIST_PYTHON_GO_JAVA_WECHATY,
'wechaty/*wechaty*' : ROOM_ID_LIST_WECHATY_DEVELOPERS,
'wechaty/PMC' : ROOM_ID_WECHATY_CONTRIBUTORS,
'wechaty/bot5.club' : ROOM_ID_LIST_BOT5_CLUB,
'wechaty/friday' : [
...ROOM_ID_LIST_WECHATY_DEVELOPERS, |
<<<<<<<
if (owner === 'juzibot' && repository === 'Juzi-WeChat-Work-Tasks') {
const wxBotUrl = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send'
const key = '974db6af-6b24-41aa-8da6-5ed634d24fcf'
const options = {
body: {
markdown: {
content: `[${urlLinkPayload.title}](${urlLinkPayload.url}) \n ${urlLinkPayload.description}`,
},
msgtype: 'markdown',
},
headers: { 'content-type': 'application/json' },
json: true,
method: 'POST',
qs: { key: key },
url: wxBotUrl,
}
request(options, function (error) {
if (error) throw new Error(error)
})
}
const roomList = getRoomList(owner, repository)
=======
const roomList = await getRoomList(owner, repository)
>>>>>>>
if (owner === 'juzibot' && repository === 'Juzi-WeChat-Work-Tasks') {
const wxBotUrl = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send'
const key = '974db6af-6b24-41aa-8da6-5ed634d24fcf'
const options = {
body: {
markdown: {
content: `[${urlLinkPayload.title}](${urlLinkPayload.url}) \n ${urlLinkPayload.description}`,
},
msgtype: 'markdown',
},
headers: { 'content-type': 'application/json' },
json: true,
method: 'POST',
qs: { key: key },
url: wxBotUrl,
}
request(options, function (error) {
if (error) throw new Error(error)
})
}
const roomList = await getRoomList(owner, repository) |
<<<<<<<
import { Controller, Get, Post, Body, Param, Delete, Patch, UsePipes, ValidationPipe } from '@nestjs/common';
=======
import { Controller, Get, Post, Body, Param, Delete, Patch, Query } from '@nestjs/common';
>>>>>>>
import { Controller, Get, Post, Body, Param, Delete, Patch, Query, UsePipes, ValidationPipe } from '@nestjs/common';
<<<<<<<
import { TaskStatusValidationPipe } from './pipes/task-status-validation.pipe';
=======
import { GetTasksFilterDto } from './dto/get-tasks-filter.dto';
>>>>>>>
import { TaskStatusValidationPipe } from './pipes/task-status-validation.pipe';
import { GetTasksFilterDto } from './dto/get-tasks-filter.dto'; |
<<<<<<<
import { PanModifier } from './panmodifier';
import { PinchZoomModifier } from './pinchzoommodifier';
=======
import { TouchEventProvider } from './toucheventprovider';
>>>>>>>
import { PanModifier } from './panmodifier';
import { PinchZoomModifier } from './pinchzoommodifier';
<<<<<<<
/* Create event handler that listens to mouse events. */
this._eventHandler = new EventHandler(invalidate, eventProvider);
/* Listen to pointer events. */
this._eventHandler.pushPointerDownHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerDown(latests, previous));
this._eventHandler.pushPointerUpHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerUp(latests, previous));
this._eventHandler.pushPointerEnterHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerEnter(latests, previous));
this._eventHandler.pushPointerLeaveHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerLeave(latests, previous));
this._eventHandler.pushPointerMoveHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerMove(latests, previous));
this._eventHandler.pushPointerCancelHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerCancel(latests, previous));
this._eventHandler.pushMouseWheelHandler((latests: Array<WheelEvent>, previous: Array<WheelEvent>) =>
this.onWheel(latests, previous));
=======
/* Listen to touch events. */
if (touchEventProvider !== undefined) {
this._eventHandler.pushTouchStartHandler((latests: Array<TouchEvent>, previous: Array<TouchEvent>) =>
this.onTouchStart(latests, previous));
this._eventHandler.pushTouchEndHandler((latests: Array<TouchEvent>, previous: Array<TouchEvent>) =>
this.onTouchEnd(latests, previous));
this._eventHandler.pushTouchMoveHandler((latests: Array<TouchEvent>, previous: Array<TouchEvent>) =>
this.onTouchMove(latests, previous));
}
// this._eventHandler.pushMouseWheelHandler((latests: Array<WheelEvent>, previous: Array<WheelEvent>) =>
// this.onWheel(latests, previous));
>>>>>>>
/* Create event handler that listens to mouse events. */
this._eventHandler = new EventHandler(invalidate, eventProvider);
/* Listen to pointer events. */
this._eventHandler.pushPointerDownHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerDown(latests, previous));
this._eventHandler.pushPointerUpHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerUp(latests, previous));
this._eventHandler.pushPointerEnterHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerEnter(latests, previous));
this._eventHandler.pushPointerLeaveHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerLeave(latests, previous));
this._eventHandler.pushPointerMoveHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerMove(latests, previous));
this._eventHandler.pushPointerCancelHandler((latests: Array<PointerEvent>, previous: Array<PointerEvent>) =>
this.onPointerCancel(latests, previous));
this._eventHandler.pushMouseWheelHandler((latests: Array<WheelEvent>, previous: Array<WheelEvent>) =>
this.onWheel(latests, previous));
<<<<<<<
const isMouseRotate = isMouseEvent && isPrimaryButtonDown && numPointers === 1;
const isTouchRotate = isTouchEvent && numPointers === 1;
const isMousePan = isMouseEvent && isPrimaryButtonDown && isShiftKeyDown && numPointers === 1;
const isMultiTouch = isTouchEvent && numPointers === 2;
=======
if (isPointerLockedRotate || ((isMouseDown || isMouseMove) && isPrimaryButtonDown) || isTouchEvent) {
return Navigation.Modes.Rotate;
>>>>>>>
const isMouseRotate = isMouseEvent && isPrimaryButtonDown && numPointers === 1;
const isTouchRotate = isTouchEvent && numPointers === 1;
const isMousePan = isMouseEvent && isPrimaryButtonDown && isShiftKeyDown && numPointers === 1;
const isMultiTouch = isTouchEvent && numPointers === 2;
<<<<<<<
=======
if (event.cancelable) {
event.preventDefault();
}
>>>>>>>
<<<<<<<
=======
if (event.cancelable) {
event.preventDefault();
}
>>>>>>>
<<<<<<<
=======
if (event.cancelable) {
event.preventDefault();
}
>>>>>>>
<<<<<<<
protected onPointerUp(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void {
for (const pointer of latests) {
this._activeEvents.delete(pointer.pointerId);
}
}
=======
protected onTouchStart(latests: Array<TouchEvent>, previous: Array<TouchEvent>): void {
const event: TouchEvent = latests[latests.length - 1];
// for (const event of latests) {
this._mode = this.mode(event);
switch (this._mode) {
case Navigation.Modes.Zoom:
// this.startZoom(event);
break;
case Navigation.Modes.Rotate:
this.rotate(event, true);
break;
default:
break;
// }
}
}
protected onMouseUp(latests: Array<MouseEvent>, previous: Array<MouseEvent>): void {
const event: MouseEvent = latests[latests.length - 1];
>>>>>>>
protected onPointerUp(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void {
for (const pointer of latests) {
this._activeEvents.delete(pointer.pointerId);
}
}
<<<<<<<
=======
if (event.cancelable) {
event.preventDefault();
}
// }
}
protected onTouchEnd(latests: Array<TouchEvent>, previous: Array<TouchEvent>): void {
const event: TouchEvent = latests[latests.length - 1];
// for (const event of latests) {
if (undefined === this._mode) {
return;
}
if (event.cancelable) {
event.preventDefault();
}
// }
>>>>>>>
<<<<<<<
protected onWheel(latests: Array<WheelEvent>, previous: Array<WheelEvent>): void {
const event = latests[0];
this._wheelZoom?.process(event.deltaY);
=======
protected onTouchMove(latests: Array<TouchEvent>, previous: Array<TouchEvent>): void {
const event: TouchEvent = latests[latests.length - 1];
// for (const event of latests) {
const modeWasUndefined = (this._mode === undefined);
this._mode = this.mode(event);
switch (this._mode) {
// case Navigation.Modes.Zoom:
// // modeWasUndefined ? this.startZoom(event) : this.updateZoom(event);
// break;
case Navigation.Modes.Rotate:
this.rotate(event, modeWasUndefined);
break;
default:
break;
// }
}
}
protected onClick(latests: Array<MouseEvent>, previous: Array<MouseEvent>): void {
// const event: MouseEvent = latests[latests.length - 1];
>>>>>>>
protected onWheel(latests: Array<WheelEvent>, previous: Array<WheelEvent>): void {
const event = latests[0];
this._wheelZoom?.process(event.deltaY); |
<<<<<<<
export { EnvironmentRenderingPass, EnvironmentTextureType } from './environmentrenderingpass';
=======
export { DebugPass } from './debugpass';
>>>>>>>
export { DebugPass } from './debugpass';
export { EnvironmentRenderingPass, EnvironmentTextureType } from './environmentrenderingpass'; |
<<<<<<<
this.finishLoading();
=======
this._debugPass = new DebugPass(context);
this._debugPass.initialize();
this._debugPass.framebuffer = this._shadowPass.shadowMapFBO;
this._debugPass.readBuffer = gl.COLOR_ATTACHMENT0;
this._debugPass.target = this._defaultFBO;
this._debugPass.drawBuffer = gl.BACK;
>>>>>>>
this._debugPass = new DebugPass(context);
this._debugPass.initialize();
this._debugPass.framebuffer = this._shadowPass.shadowMapFBO;
this._debugPass.readBuffer = gl.COLOR_ATTACHMENT0;
this._debugPass.target = this._defaultFBO;
this._debugPass.drawBuffer = gl.BACK;
this.finishLoading(); |
<<<<<<<
EnvironmentRenderingPass,
EnvironmentTextureType,
=======
EventProvider,
>>>>>>>
EnvironmentRenderingPass,
EnvironmentTextureType,
EventProvider, |
<<<<<<<
EnvironmentRenderingPass,
EnvironmentTextureType,
=======
EventProvider,
>>>>>>>
EnvironmentRenderingPass,
EnvironmentTextureType,
EventProvider, |
<<<<<<<
import { IAction } from 'shared/types/app';
import { IFields } from 'shared/types/models';
=======
import { IFieldsResponse } from 'shared/api/Api';
>>>>>>>
import { IFields } from 'shared/types/models';
<<<<<<<
function loadFieldsSuccessed(data: IFields): IAction {
=======
export function loadFieldsCompleted(data: IFieldsResponse): NS.ILoadFieldsCompletedAction {
>>>>>>>
export function loadFieldsCompleted(data: IFields): NS.ILoadFieldsCompletedAction { |
<<<<<<<
this._equiRectangularMap.fetch('data/equirectangular-map.jpg').then(() => {
this.setupTexture2D(this._equiRectangularMap);
});
=======
promises.push(
this._equiRectangularMap.fetch('data/equirectangular-map.jpg').then(() => {
this.setupTexture2D(this._equiRectangularMap, gl.TEXTURE1);
}));
>>>>>>>
promises.push(
this._equiRectangularMap.fetch('data/equirectangular-map.jpg').then(() => {
this.setupTexture2D(this._equiRectangularMap);
}));
<<<<<<<
this._sphereMap.fetch('data/sphere-map-ny.jpg').then(() => {
this.setupTexture2D(this._sphereMap);
});
=======
promises.push(
this._sphereMap.fetch('data/sphere-map-ny.jpg').then(() => {
this.setupTexture2D(this._sphereMap, gl.TEXTURE2);
}));
>>>>>>>
promises.push(
this._sphereMap.fetch('data/sphere-map-ny.jpg').then(() => {
this.setupTexture2D(this._sphereMap);
}));
<<<<<<<
this._polarMaps[0].fetch('data/paraboloid-map-py.jpg').then(() => {
this.setupTexture2D(this._polarMaps[0]);
});
=======
promises.push(
this._polarMaps[0].fetch('data/paraboloid-map-py.jpg').then(() => {
this.setupTexture2D(this._polarMaps[0], gl.TEXTURE3);
}));
>>>>>>>
promises.push(
this._polarMaps[0].fetch('data/paraboloid-map-py.jpg').then(() => {
this.setupTexture2D(this._polarMaps[0]);
}));
<<<<<<<
this._polarMaps[1].fetch('data/paraboloid-map-ny.jpg').then(() => {
this.setupTexture2D(this._polarMaps[1]);
=======
promises.push(
this._polarMaps[1].fetch('data/paraboloid-map-ny.jpg').then(() => {
this.setupTexture2D(this._polarMaps[1], gl.TEXTURE4);
}));
Promise.all(promises).then(() => {
this.finishLoading();
>>>>>>>
promises.push(
this._polarMaps[1].fetch('data/paraboloid-map-ny.jpg').then(() => {
this.setupTexture2D(this._polarMaps[1]);
}));
Promise.all(promises).then(() => {
this.finishLoading(); |
<<<<<<<
import { ICategory } from 'shared/types/models';
import { ICommunicationState } from 'shared/helpers/redux';
=======
import { ICategoriesResponse } from 'shared/api/Api';
import { IAction, IPlainAction } from 'shared/types/app';
export interface ICategory {
uid: number;
name: string;
id: number;
}
export interface ICommunication {
isRequesting: boolean;
error: string;
}
>>>>>>>
import { ICategory } from 'shared/types/models';
import { ICommunicationState } from 'shared/helpers/redux';
import { IAction, IPlainAction } from 'shared/types/app'; |
<<<<<<<
import { queryRunningStatus } from './query-loading-action-creators';
export function queryResponseError(response: object): IAction {
return {
type: QUERY_GRAPH_ERROR,
response,
};
}
=======
import { queryResponseError } from './error-action-creator';
>>>>>>>
import { queryResponseError } from './error-action-creator';
import { queryRunningStatus } from './query-loading-action-creators';
<<<<<<<
const options: IRequestOptions = { method: query.selectedVerb, headers };
dispatch(queryRunningStatus(true));
=======
const options: IRequestOptions = { method: query.selectedVerb, headers };
>>>>>>>
const options: IRequestOptions = { method: query.selectedVerb, headers };
dispatch(queryRunningStatus(true));
<<<<<<<
.then((json) =>
dispatch(
=======
.then((json) => {
if (json.ok === false) {
return dispatch(queryResponseError(json));
}
return dispatch(
>>>>>>>
.then((json) => {
if (json.ok === false) {
return dispatch(queryResponseError(json));
}
return dispatch(
<<<<<<<
),
)
.catch((error) => dispatch(
queryResponseError(error)
));
=======
);
});
>>>>>>>
);
});
<<<<<<<
return dispatch(
queryResponseError(response.body),
);
=======
return dispatch(queryResponseError(response));
>>>>>>>
return dispatch(queryResponseError(response)); |
<<<<<<<
export { default as Tooltip } from './Tooltip/Tooltip';
export { default as Select, ISelectOption } from './Select/Select';
export { default as Preloader } from './Preloader/Preloader';
export { default as FormLabel } from './FormLabel/FormLabel';
=======
export { default as Tooltip } from './Tooltip/Tooltip';
export { default as Grid } from './Grid/Grid';
>>>>>>>
export { default as Tooltip } from './Tooltip/Tooltip';
export { default as Select, ISelectOption } from './Select/Select';
export { default as Preloader } from './Preloader/Preloader';
export { default as FormLabel } from './FormLabel/FormLabel';
export { default as Grid } from './Grid/Grid'; |
<<<<<<<
import {Template} from './Template';
import {TemplateHelperFunction} from './TemplateHelpers';
import {Assert} from '../../misc/Assert';
import {ComponentOptions, IComponentOptionsFieldsOption} from '../Base/ComponentOptions';
import {Utils} from '../../utils/Utils';
import {$$} from '../../utils/Dom';
import _ = require('underscore');
_.templateSettings = {
evaluate: /(?:<%|{{)([\s\S]+?)(?:%>|}})/g,
interpolate: /(?:<%|{{)=([\s\S]+?)(?:%>|}})/g,
escape: /(?:<%|{{)-([\s\S]+?)(?:%>|}})/g
}
export class UnderscoreTemplate extends Template {
private template: (data: any) => string;
public static templateHelpers: { [templateName: string]: TemplateHelperFunction; } = {};
private fields: string[];
public static mimeTypes = [
'text/underscore',
'text/underscore-template',
'text/x-underscore',
'text/x-underscore-template'
];
constructor(public element: HTMLElement) {
super();
Assert.exists(element);
var templateString = element.innerHTML;
this.template = _.template(templateString);
var condition = $$(element).getAttribute('data-condition');
if (condition != null) {
this.condition = new Function('obj', 'with(obj||{}){return ' + condition + '}')
}
this.dataToString = (object) => {
var extended = _.extend({}, object, UnderscoreTemplate.templateHelpers);
return this.template(extended);
};
this.fields = Template.getFieldFromString(templateString + ' ' + condition);
var additionalFields = ComponentOptions.loadFieldsOption(element, 'fields', <IComponentOptionsFieldsOption>{ includeInResults: true });
if (additionalFields != null) {
// remove the @
this.fields = this.fields.concat(_.map(additionalFields, (field) => field.substr(1)));
}
}
toHtmlElement(): HTMLElement {
var script = $$('script');
script.setAttribute('type', _.first(UnderscoreTemplate.mimeTypes));
script.setAttribute('data-condition', $(this.element).data('condition'));
script.text(this.element.innerHTML);
return script.el;
}
getType() {
return 'UnderscoreTemplate'
}
static create(element: HTMLElement): UnderscoreTemplate {
Assert.exists(element);
return new UnderscoreTemplate(element);
}
static fromString(template: string, condition?: string): UnderscoreTemplate {
var script = document.createElement('script');
script.text = template;
if (condition != null) {
$$(script).setAttribute('data-condition', condition);
}
$$(script).setAttribute('type', UnderscoreTemplate.mimeTypes[0]);
return new UnderscoreTemplate(script);
}
getFields() {
return this.fields;
}
static registerTemplateHelper(helperName: string, helper: TemplateHelperFunction) {
UnderscoreTemplate.templateHelpers[helperName] = helper;
}
static isLibraryAvailable(): boolean {
return Utils.exists(window['_']);
}
}
=======
import {Template} from './Template';
import {ITemplateHelperFunction} from './TemplateHelpers';
import {Assert} from '../../misc/Assert';
import {ComponentOptions, IFieldsOption} from '../Base/ComponentOptions';
import {Utils} from '../../utils/Utils';
import {$$} from '../../utils/Dom';
import _ = require('underscore');
_.templateSettings = {
evaluate: /(?:<%|{{)([\s\S]+?)(?:%>|}})/g,
interpolate: /(?:<%|{{)=([\s\S]+?)(?:%>|}})/g,
escape: /(?:<%|{{)-([\s\S]+?)(?:%>|}})/g
}
export class UnderscoreTemplate extends Template {
private template: (data: any) => string;
public static templateHelpers: { [templateName: string]: ITemplateHelperFunction; } = {};
private fields: string[];
public static mimeTypes = [
'text/underscore',
'text/underscore-template',
'text/x-underscore',
'text/x-underscore-template'
];
constructor(public element: HTMLElement) {
super();
Assert.exists(element);
var templateString = element.innerHTML;
this.template = _.template(templateString);
var condition = $$(element).getAttribute('data-condition');
if (condition != null) {
this.condition = new Function('obj', 'with(obj||{}){return ' + condition + '}')
}
this.dataToString = (object) => {
var extended = _.extend({}, object, UnderscoreTemplate.templateHelpers);
return this.template(extended);
};
this.fields = Template.getFieldFromString(templateString + ' ' + condition);
var additionalFields = ComponentOptions.loadFieldsOption(element, 'fields', <IFieldsOption>{ includeInResults: true });
if (additionalFields != null) {
// remove the @
this.fields = this.fields.concat(_.map(additionalFields, (field) => field.substr(1)));
}
}
toHtmlElement(): HTMLElement {
var script = $$('script');
script.setAttribute('type', _.first(UnderscoreTemplate.mimeTypes));
script.setAttribute('data-condition', $(this.element).data('condition'));
script.text(this.element.innerHTML);
return script.el;
}
getType() {
return 'UnderscoreTemplate'
}
static create(element: HTMLElement): UnderscoreTemplate {
Assert.exists(element);
return new UnderscoreTemplate(element);
}
static fromString(template: string, condition?: string): UnderscoreTemplate {
var script = document.createElement('script');
script.text = template;
if (condition != null) {
$$(script).setAttribute('data-condition', condition);
}
$$(script).setAttribute('type', UnderscoreTemplate.mimeTypes[0]);
return new UnderscoreTemplate(script);
}
getFields() {
return this.fields;
}
static registerTemplateHelper(helperName: string, helper: ITemplateHelperFunction) {
UnderscoreTemplate.templateHelpers[helperName] = helper;
}
static isLibraryAvailable(): boolean {
return Utils.exists(window['_']);
}
}
>>>>>>>
import {Template} from './Template';
import {TemplateHelperFunction} from './TemplateHelpers';
import {Assert} from '../../misc/Assert';
import {ComponentOptions, IComponentOptionsFieldsOption} from '../Base/ComponentOptions';
import {Utils} from '../../utils/Utils';
import {$$} from '../../utils/Dom';
import _ = require('underscore');
_.templateSettings = {
evaluate: /(?:<%|{{)([\s\S]+?)(?:%>|}})/g,
interpolate: /(?:<%|{{)=([\s\S]+?)(?:%>|}})/g,
escape: /(?:<%|{{)-([\s\S]+?)(?:%>|}})/g
}
export class UnderscoreTemplate extends Template {
private template: (data: any) => string;
public static templateHelpers: { [templateName: string]: TemplateHelperFunction; } = {};
private fields: string[];
public static mimeTypes = [
'text/underscore',
'text/underscore-template',
'text/x-underscore',
'text/x-underscore-template'
];
constructor(public element: HTMLElement) {
super();
Assert.exists(element);
var templateString = element.innerHTML;
this.template = _.template(templateString);
var condition = $$(element).getAttribute('data-condition');
if (condition != null) {
this.condition = new Function('obj', 'with(obj||{}){return ' + condition + '}')
}
this.dataToString = (object) => {
var extended = _.extend({}, object, UnderscoreTemplate.templateHelpers);
return this.template(extended);
};
this.fields = Template.getFieldFromString(templateString + ' ' + condition);
var additionalFields = ComponentOptions.loadFieldsOption(element, 'fields', <IFieldsOption>{ includeInResults: true });
if (additionalFields != null) {
// remove the @
this.fields = this.fields.concat(_.map(additionalFields, (field) => field.substr(1)));
}
}
toHtmlElement(): HTMLElement {
var script = $$('script');
script.setAttribute('type', _.first(UnderscoreTemplate.mimeTypes));
script.setAttribute('data-condition', $(this.element).data('condition'));
script.text(this.element.innerHTML);
return script.el;
}
getType() {
return 'UnderscoreTemplate'
}
static create(element: HTMLElement): UnderscoreTemplate {
Assert.exists(element);
return new UnderscoreTemplate(element);
}
static fromString(template: string, condition?: string): UnderscoreTemplate {
var script = document.createElement('script');
script.text = template;
if (condition != null) {
$$(script).setAttribute('data-condition', condition);
}
$$(script).setAttribute('type', UnderscoreTemplate.mimeTypes[0]);
return new UnderscoreTemplate(script);
}
getFields() {
return this.fields;
}
static registerTemplateHelper(helperName: string, helper: TemplateHelperFunction) {
UnderscoreTemplate.templateHelpers[helperName] = helper;
}
static isLibraryAvailable(): boolean {
return Utils.exists(window['_']);
}
} |
<<<<<<<
import {Assert} from '../../misc/Assert'
import {l} from '../../strings/Strings'
import {$$} from '../../utils/Dom'
import {KeyboardUtils, KEYBOARD} from '../../utils/KeyboardUtils';
=======
import {Assert} from '../../misc/Assert';
import {l} from '../../strings/Strings';
import {$$} from '../../utils/Dom';
>>>>>>>
import {Assert} from '../../misc/Assert';
import {l} from '../../strings/Strings';
import {$$} from '../../utils/Dom';
import {KeyboardUtils, KEYBOARD} from '../../utils/KeyboardUtils';
<<<<<<<
}
$$(listItem).on('click', clickAction);
$$(listItem).on('keyup', KeyboardUtils.keypressAction(KEYBOARD.ENTER, clickAction));
=======
});
>>>>>>>
$$(listItem).on('click', clickAction);
$$(listItem).on('keyup', KeyboardUtils.keypressAction(KEYBOARD.ENTER, clickAction)); |
<<<<<<<
return new this.facetValueElementKlass(this.facet, facetValue, this.facet.keepDisplayedValuesNextTime).build().renderer.listItem;
})
=======
return new this.facetValueElementKlass(this.facet, facetValue, this.facet.keepDisplayedValuesNextTime).build().renderer.listElement;
});
>>>>>>>
return new this.facetValueElementKlass(this.facet, facetValue, this.facet.keepDisplayedValuesNextTime).build().renderer.listItem;
}); |
<<<<<<<
import * as _ from 'underscore';
=======
import _ = require('underscore');
import {ResultList} from '../ResultList/ResultList';
import {StreamHighlightUtils} from '../../utils/StreamHighlightUtils';
>>>>>>>
import * as _ from 'underscore';
import {ResultList} from '../ResultList/ResultList';
import {StreamHighlightUtils} from '../../utils/StreamHighlightUtils'; |
<<<<<<<
import {KeyboardUtils, KEYBOARD} from '../../utils/KeyboardUtils';
=======
import {IStringMap} from '../../rest/GenericParam';
import {FacetValuesOrder} from './FacetValuesOrder';
import {ValueElement} from './ValueElement';
>>>>>>>
import {KeyboardUtils, KEYBOARD} from '../../utils/KeyboardUtils';
import {IStringMap} from '../../rest/GenericParam';
import {FacetValuesOrder} from './FacetValuesOrder';
import {ValueElement} from './ValueElement';
<<<<<<<
})
this.facetValuesList.valueContainer.appendChild(searchButton.listItem);
=======
});
this.facetValuesList.valueContainer.appendChild(built.listElement);
>>>>>>>
});
this.facetValuesList.valueContainer.appendChild(searchButton.listItem);
<<<<<<<
more = $$('div', { className: 'coveo-facet-more', tabindex: 0 },
$$('span', { className: 'coveo-icon' })).el;
=======
let more = document.createElement('div');
$$(more).addClass('coveo-facet-more');
let moreIcon = document.createElement('span');
$$(moreIcon).addClass('coveo-icon');
more.appendChild(moreIcon);
$$(more).on('click', () => this.handleClickMore());
return more;
>>>>>>>
more = $$('div', { className: 'coveo-facet-more', tabindex: 0 },
$$('span', { className: 'coveo-icon' })).el; |
<<<<<<<
private popupBackgroundClickListener: EventListener;
private facets: Array<Facet> = [];
=======
private documentClickListener: EventListener;
private facets: Facet[] = [];
private facetSliders: FacetSlider[] = [];
>>>>>>>
private popupBackgroundClickListener: EventListener;
private facets: Facet[] = [];
private facetSliders: FacetSlider[] = [];
<<<<<<<
=======
private bindDropdownContentEvents() {
this.documentClickListener = event => {
if (Utils.isHtmlElement(event.target)) {
let eventTarget = $$(<HTMLElement>event.target);
if (this.shouldCloseFacetDropdown(eventTarget)) {
this.closeDropdown();
}
}
};
$$(document.documentElement).on('click', this.documentClickListener);
}
>>>>>>>
<<<<<<<
this.popupBackground.on('click', () => this.detachDropdown());
=======
}
private shouldCloseFacetDropdown(eventTarget: Dom) {
return !eventTarget.closest('coveo-facet-column') && !eventTarget.closest('coveo-facet-dropdown-header')
&& this.searchInterface.isSmallInterface() && !eventTarget.closest('coveo-facet-settings-popup');
>>>>>>>
this.popupBackground.on('click', () => this.closeDropdown()); |
<<<<<<<
/// <reference path="ui/SearchAlertsTest.ts" />
/// <reference path="ui/FollowItemTest.ts" />
/// <reference path="ui/SearchAlertsMessageTest.ts" />
=======
/// <reference path="ui/FieldSuggestionsTest.ts" />
/// <reference path="ui/AuthenticationProviderTest.ts" />
>>>>>>>
/// <reference path="ui/FieldSuggestionsTest.ts" />
/// <reference path="ui/AuthenticationProviderTest.ts" />
/// <reference path="ui/SearchAlertsTest.ts" />
/// <reference path="ui/FollowItemTest.ts" />
/// <reference path="ui/SearchAlertsMessageTest.ts" /> |
<<<<<<<
import { GoogleMaps } from '@ionic-native/google-maps';
=======
import { AppVersion } from '@ionic-native/app-version';
>>>>>>>
import { GoogleMaps } from '@ionic-native/google-maps';
import { AppVersion } from '@ionic-native/app-version';
<<<<<<<
Firebase,
GoogleMaps
=======
Firebase,
AppVersion,
>>>>>>>
Firebase,
GoogleMaps,
AppVersion |
<<<<<<<
import {Assert} from '../misc/Assert';
import * as _ from 'underscore';
=======
import _ = require('underscore');
>>>>>>>
import * as _ from 'underscore'; |
<<<<<<<
export {QueryboxQueryParameters} from './ui/Querybox/QueryboxQueryParameters';
export {CoveoJQuery} from './ui/Base/CoveoJQuery';
=======
export {QueryboxQueryParameters} from './ui/Querybox/QueryboxQueryParameters';
export {ImageResultList} from './ui/ImageResultList/ImageResultList';
export {FollowItem} from './ui/SearchAlerts/FollowItem';
export {SearchAlertsMessage} from './ui/SearchAlerts/SearchAlertsMessage';
export {SearchAlerts} from './ui/SearchAlerts/SearchAlerts';
>>>>>>>
export {QueryboxQueryParameters} from './ui/Querybox/QueryboxQueryParameters';
export {ImageResultList} from './ui/ImageResultList/ImageResultList';
export {CoveoJQuery} from './ui/Base/CoveoJQuery';
export {FollowItem} from './ui/SearchAlerts/FollowItem';
export {SearchAlertsMessage} from './ui/SearchAlerts/SearchAlertsMessage';
export {SearchAlerts} from './ui/SearchAlerts/SearchAlerts'; |
<<<<<<<
import * as _ from 'underscore';
=======
import {l} from '../../strings/Strings';
import _ = require('underscore');
>>>>>>>
import * as _ from 'underscore';
import {l} from '../../strings/Strings'; |
<<<<<<<
export {CurrentTab} from './ui/CurrentTab/CurrentTab';
export {CoveoJQuery} from './ui/Base/CoveoJQuery';
=======
export {CurrentTab} from './ui/CurrentTab/CurrentTab';
export {QueryboxQueryParameters} from './ui/Querybox/QueryboxQueryParameters';
>>>>>>>
export {CurrentTab} from './ui/CurrentTab/CurrentTab';
export {QueryboxQueryParameters} from './ui/Querybox/QueryboxQueryParameters';
export {CoveoJQuery} from './ui/Base/CoveoJQuery'; |
<<<<<<<
if (!this.options.openQuickview) {
$$(element).on("click", () => {
this.logOpenDocument();
});
=======
module Coveo {
export class ResultLink extends Component {
static ID = 'ResultLink';
static options = <ResultLinkOptions>{
field: ComponentOptions.buildFieldOption(),
openInOutlook: ComponentOptions.buildBooleanOption({ defaultValue: false }),
openQuickview: ComponentOptions.buildBooleanOption(),
alwaysOpenInNewWindow: ComponentOptions.buildBooleanOption({ defaultValue: false })
};
static fields = [
'outlookformacuri',
'outlookuri',
'connectortype',
'urihash', // analytics
'collection', // analytics
'source', // analytics
'author' // analytics
]
constructor(public element: HTMLElement, public options?: ResultLinkOptions, public bindings?: IResultsComponentBindings, public result?: IQueryResult, public os?: OSUtils.NAME) {
super(element, ResultLink.ID, bindings);
this.options = ComponentOptions.initComponentOptions(element, ResultLink, options);
this.options = $.extend({}, this.options, this.componentOptionsModel.get(ComponentOptionsModel.attributesEnum.resultLink))
this.result = result || this.resolveResult();
if (this.options.openQuickview == null) {
this.options.openQuickview = result.raw['connectortype'] == "ExchangeCrawler" && DeviceUtils.isMobileDevice();
}
Assert.exists(this.componentOptionsModel);
Assert.exists(this.result);
if (!this.quickviewShouldBeOpened()) {
$(element).on("click", () => {
this.logOpenDocument();
});
}
if (/^\s*$/.test(this.element.innerHTML)) {
this.element.innerHTML = this.result.title ? HighlightUtils.highlightString(this.result.title, this.result.titleHighlights, null, 'coveo-highlight') : this.result.clickUri;
}
this.bindEventToOpen();
>>>>>>>
if (!this.quickviewShouldBeOpened()) {
$$(element).on("click", () => {
this.logOpenDocument();
});
<<<<<<<
private bindOnClickIfNotUndefined() {
if (this.options.onClick != undefined) {
$$(this.element).on('click', (e: Event) => {
this.options.onClick.call(this, e, this.result)
});
return true;
} else {
return false;
=======
private bindOpenQuickviewIfNotUndefined() {
if (this.quickviewShouldBeOpened()) {
$(this.element).click((e: JQueryEventObject) => {
e.preventDefault();
$(this.bindings.resultElement).trigger(ResultListEvents.openQuickview)
});
return true;
} else {
return false;
}
>>>>>>>
private bindOnClickIfNotUndefined() {
if (this.options.onClick != undefined) {
$$(this.element).on('click', (e: Event) => {
this.options.onClick.call(this, e, this.result)
});
return true;
} else {
return false;
<<<<<<<
return false;
}
private isUriThatMustBeOpenedInQuickview(): boolean {
return this.result.clickUri.toLowerCase().indexOf('ldap://') == 0;
=======
private quickviewShouldBeOpened() {
return (this.options.openQuickview || this.isUriThatMustBeOpenedInQuickview()) && QueryUtils.hasHTMLVersion(this.result);
}
>>>>>>>
return false;
}
private isUriThatMustBeOpenedInQuickview(): boolean {
return this.result.clickUri.toLowerCase().indexOf('ldap://') == 0;
}
private quickviewShouldBeOpened() {
return (this.options.openQuickview || this.isUriThatMustBeOpenedInQuickview()) && QueryUtils.hasHTMLVersion(this.result); |
<<<<<<<
private _party_member_on_map:boolean;
=======
private _harvest_indicator: boolean;
>>>>>>>
private _party_member_on_map:boolean;
private _harvest_indicator: boolean;
<<<<<<<
get party_member_on_map():boolean {
return this._party_member_on_map;
}
set party_member_on_map(party_member_on_map: boolean) {
this.settingsProvider.write('option.vip.general.party_member_on_map', party_member_on_map);
this._party_member_on_map = party_member_on_map;
}
=======
get harvest_indicator(): boolean {
return this._harvest_indicator;
}
set harvest_indicator(harvest_indicator: boolean) {
this.settingsProvider.write('option.vip.general.harvest_indicator', harvest_indicator);
this._harvest_indicator = harvest_indicator;
}
>>>>>>>
get party_member_on_map():boolean {
return this._party_member_on_map;
}
set party_member_on_map(party_member_on_map: boolean) {
this.settingsProvider.write('option.vip.general.party_member_on_map', party_member_on_map);
this._party_member_on_map = party_member_on_map;
}
get harvest_indicator(): boolean {
return this._harvest_indicator;
}
set harvest_indicator(harvest_indicator: boolean) {
this.settingsProvider.write('option.vip.general.harvest_indicator', harvest_indicator);
this._harvest_indicator = harvest_indicator;
}
<<<<<<<
this.party_member_on_map = this.settingsProvider.read('option.vip.general.party_member_on_map');
=======
this.harvest_indicator = this.settingsProvider.read('option.vip.general.harvest_indicator');
>>>>>>>
this.party_member_on_map = this.settingsProvider.read('option.vip.general.party_member_on_map');
this.harvest_indicator = this.settingsProvider.read('option.vip.general.harvest_indicator'); |
<<<<<<<
=======
import { Jobsxp } from "app/core/mods/jobsxp/jobsxp";
import { FightChronometer } from "app/core/mods/fightchronometer/fightchronometer";
>>>>>>>
import { Jobsxp } from "app/core/mods/jobsxp/jobsxp";
import { FightChronometer } from "app/core/mods/fightchronometer/fightchronometer";
<<<<<<<
=======
private jobsxp: Jobsxp;
private fightchronometer: FightChronometer;
>>>>>>>
private jobsxp: Jobsxp;
private fightchronometer: FightChronometer;
<<<<<<<
=======
if (this.jobsxp) this.jobsxp.reset();
if (this.fightchronometer) this.fightchronometer.reset();
>>>>>>>
if (this.jobsxp) this.jobsxp.reset();
if (this.fightchronometer) this.fightchronometer.reset();
<<<<<<<
=======
this.jobsxp = new Jobsxp(this.game.window, this.settingsService.option.vip.general, this.translate);
this.fightchronometer = new FightChronometer(this.game.window, this.settingsService.option.vip.general);
>>>>>>>
this.jobsxp = new Jobsxp(this.game.window, this.settingsService.option.vip.general, this.translate);
this.fightchronometer = new FightChronometer(this.game.window, this.settingsService.option.vip.general); |
<<<<<<<
{ name: 'Espagnol', value: "es" },
{ name: 'Italiano', value: "it" }
=======
{ name: 'Español', value: "es" }
>>>>>>>
{ name: 'Español', value: "es" },
{ name: 'Italiano', value: "it" } |
<<<<<<<
import { Component, OnInit } from '@angular/core';
import { FORM_DIRECTIVES } from '@angular/common';
import { single, multi, countries } from './data';
import chartGroups from './chartTypes';
=======
import { Component } from '@angular/core';
import { single, multi } from './data';
>>>>>>>
import { Component, OnInit } from '@angular/core';
import { single, multi, countries } from './data';
import chartGroups from './chartTypes'; |
<<<<<<<
import { ThemeProvider, ThemeChangedEventArgs } from '@microsoft/sp-component-base';
import IExtensibilityService from '../../services/ExtensibilityService/IExtensibilityService';
import { ExtensibilityService } from '../../services/ExtensibilityService/ExtensibilityService';
import { ISuggestionProviderDefinition } from '../../services/ExtensibilityService/ISuggestionProviderDefinition';
import { SharePointDefaultSuggestionProvider } from '../../providers/SharePointDefaultSuggestionProvider';
import { ISuggestionProviderInstance } from '../../services/ExtensibilityService/ISuggestionProviderInstance';
import { ObjectCreator } from '../../services/ExtensibilityService/ObjectCreator';
import { BaseSuggestionProvider } from '../../providers/BaseSuggestionProvider';
import { Toggle } from 'office-ui-fabric-react/lib/Toggle';
=======
import { ThemeProvider, ThemeChangedEventArgs, IReadonlyTheme } from '@microsoft/sp-component-base';
import { isEqual } from '@microsoft/sp-lodash-subset';
>>>>>>>
import IExtensibilityService from '../../services/ExtensibilityService/IExtensibilityService';
import { ExtensibilityService } from '../../services/ExtensibilityService/ExtensibilityService';
import { ISuggestionProviderDefinition } from '../../services/ExtensibilityService/ISuggestionProviderDefinition';
import { SharePointDefaultSuggestionProvider } from '../../providers/SharePointDefaultSuggestionProvider';
import { ISuggestionProviderInstance } from '../../services/ExtensibilityService/ISuggestionProviderInstance';
import { ObjectCreator } from '../../services/ExtensibilityService/ObjectCreator';
import { BaseSuggestionProvider } from '../../providers/BaseSuggestionProvider';
import { Toggle } from 'office-ui-fabric-react/lib/Toggle';
import { ThemeProvider, ThemeChangedEventArgs, IReadonlyTheme } from '@microsoft/sp-component-base';
import { isEqual } from '@microsoft/sp-lodash-subset';
<<<<<<<
private _extensibilityService: IExtensibilityService;
private _suggestionProviderInstances: ISuggestionProviderInstance<any>[];
private _initComplete: boolean = false;
private _foundCustomSuggestionProviders: boolean = false;
private _propertyFieldCollectionData = null;
private _customCollectionFieldType = null;
=======
private _themeVariant: IReadonlyTheme;
>>>>>>>
private _extensibilityService: IExtensibilityService;
private _suggestionProviderInstances: ISuggestionProviderInstance<any>[];
private _initComplete: boolean = false;
private _foundCustomSuggestionProviders: boolean = false;
private _propertyFieldCollectionData = null;
private _customCollectionFieldType = null;
private _themeVariant: IReadonlyTheme; |
<<<<<<<
import { IQueryModifierDefinition } from '../../services/ExtensibilityService/IQueryModifierDefinition';
import { IQueryModifierInstance } from '../../services/ExtensibilityService/IQueryModifierInstance';
import { ObjectCreator } from '../../services/ExtensibilityService/ObjectCreator';
import { BaseQueryModifier } from '../../services/ExtensibilityService/BaseQueryModifier';
=======
import { BaseClientSideWebPart, IWebPartPropertiesMetadata } from "@microsoft/sp-webpart-base";
import { IPropertyPaneGroup } from "@microsoft/sp-property-pane";
>>>>>>>
import { BaseClientSideWebPart, IWebPartPropertiesMetadata } from "@microsoft/sp-webpart-base";
import { IPropertyPaneGroup } from "@microsoft/sp-property-pane";
import { IQueryModifierDefinition } from '../../services/ExtensibilityService/IQueryModifierDefinition';
import { IQueryModifierInstance } from '../../services/ExtensibilityService/IQueryModifierInstance';
import { ObjectCreator } from '../../services/ExtensibilityService/ObjectCreator';
import { BaseQueryModifier } from '../../services/ExtensibilityService/BaseQueryModifier'; |
<<<<<<<
/**
* utf16-offset where the mapping table starts. Before that index: utf16-index === utf8-index
*/
private _mappingTableStartOffset: number
/**
* utf-16 to utf-8 mapping table for all uft-8 indexes starting at `_mappingTableStartOffset`. utf8-index are always starting at 0.
* `null` if there are no multibyte characters in the string and all utf-8 indexes are matching the utf-16 indexes.
* Example: _mappingTableStartOffset === 10, _utf16OffsetToUtf8 = [0, 3, 6] -> _utf8Indexes[10] = 10, _utf8Indexes[11] = 13
*/
private _utf8Indexes: UintArray | null
=======
private _utf16OffsetToUtf8: Int32Array | null
>>>>>>>
/**
* utf16-offset where the mapping table starts. Before that index: utf16-index === utf8-index
*/
private _mappingTableStartOffset: number
/**
* utf-16 to utf-8 mapping table for all uft-8 indexes starting at `_mappingTableStartOffset`. utf8-index are always starting at 0.
* `null` if there are no multibyte characters in the string and all utf-8 indexes are matching the utf-16 indexes.
* Example: _mappingTableStartOffset === 10, _utf16OffsetToUtf8 = [0, 3, 6] -> _utf8Indexes[10] = 10, _utf8Indexes[11] = 13
*/
private _utf8Indexes: UintArray | null
<<<<<<<
this._utf8Bytes = null;
this._utf8Indexes = null;
=======
this._utf8Bytes = null
this._utf16OffsetToUtf8 = null
>>>>>>>
this._utf8Bytes = null;
this._utf8Indexes = null;
<<<<<<<
const utf8OffsetMap = this.utf16OffsetToUtf8;
if (utf8OffsetMap && utf8Offset >= this._mappingTableStartOffset) {
return findFirstInSorted(utf8OffsetMap, utf8Offset - this._mappingTableStartOffset) + this._mappingTableStartOffset;
=======
const utf8OffsetMap = this.utf16OffsetToUtf8
if (utf8OffsetMap) {
return findFirstInSorted(utf8OffsetMap, utf8Offset)
>>>>>>>
const utf8OffsetMap = this.utf16OffsetToUtf8;
if (utf8OffsetMap && utf8Offset >= this._mappingTableStartOffset) {
return findFirstInSorted(utf8OffsetMap, utf8Offset - this._mappingTableStartOffset) + this._mappingTableStartOffset;
<<<<<<<
const utf8OffsetMap = this.utf16OffsetToUtf8;
if (utf8OffsetMap && utf16Offset >= this._mappingTableStartOffset) {
return utf8OffsetMap[utf16Offset - this._mappingTableStartOffset] + this._mappingTableStartOffset;
=======
const utf8OffsetMap = this.utf16OffsetToUtf8
if (utf8OffsetMap) {
return utf8OffsetMap[utf16Offset]
>>>>>>>
const utf8OffsetMap = this.utf16OffsetToUtf8;
if (utf8OffsetMap && utf16Offset >= this._mappingTableStartOffset) {
return utf8OffsetMap[utf16Offset - this._mappingTableStartOffset] + this._mappingTableStartOffset;
<<<<<<<
const c = str.charCodeAt(i)
if (utf16OffsetToUtf8) {
utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;
}
=======
const c = str.charCodeAt(i)
utf16OffsetToUtf8[i] = ptrHead
>>>>>>>
const c = str.charCodeAt(i)
if (utf16OffsetToUtf8) {
utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;
}
<<<<<<<
utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;
=======
utf16OffsetToUtf8[i] = ptrHead
>>>>>>>
utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;
<<<<<<<
this._utf8Indexes = utf16OffsetToUtf8;
this._mappingTableStartOffset = mappingTableStartOffset;
=======
this._utf16OffsetToUtf8 = utf16OffsetToUtf8
>>>>>>>
this._utf8Indexes = utf16OffsetToUtf8;
this._mappingTableStartOffset = mappingTableStartOffset;
<<<<<<<
function findFirstInSorted<T>(array: UintArray, i: number): number {
let low = 0, high = array.length;
=======
function findFirstInSorted<T>(array: Int32Array, i: number): number {
let low = 0
let high = array.length
>>>>>>>
function findFirstInSorted<T>(array: UintArray, i: number): number {
let low = 0
let high = array.length |
<<<<<<<
export const REQUEST_DELETE_PROJECT = 'REQUEST_DELETE_PROJECT';
export const RECEIVE_DELETE_PROJECT = 'RECEIVE_DELETE_PROJECT';
export function requestDeleteProject(projectId: number) {
return {
type: REQUEST_DELETE_PROJECT,
projectId
};
}
export function receiveDeleteProject(projectId: number, successful: boolean) {
return {
type: RECEIVE_DELETE_PROJECT,
projectId,
successful
};
}
=======
export const REGISTER_CLUSTER_ERROR = 'REGISTER_CLUSTER_ERROR';
>>>>>>>
export const REQUEST_DELETE_PROJECT = 'REQUEST_DELETE_PROJECT';
export const RECEIVE_DELETE_PROJECT = 'RECEIVE_DELETE_PROJECT';
export const REGISTER_CLUSTER_ERROR = 'REGISTER_CLUSTER_ERROR';
export function requestDeleteProject(projectId: number) {
return {
type: REQUEST_DELETE_PROJECT,
projectId
};
};
export function receiveDeleteProject(projectId: number, successful: boolean) {
return {
type: RECEIVE_DELETE_PROJECT,
projectId,
successful
};
}; |
<<<<<<<
const toolbox = await r.run('3pack three')
=======
const context = await r.run('three')
>>>>>>>
const toolbox = await r.run('three')
<<<<<<<
const toolbox = await r.run('3pack o')
=======
const context = await r.run('o')
>>>>>>>
const toolbox = await r.run('o')
<<<<<<<
const toolbox = await r.run('missing-name foo')
t.truthy(toolbox.command)
t.is(toolbox.command.name, 'foo')
=======
const context = await r.run('foo')
t.truthy(context.command)
t.is(context.command.name, 'foo')
>>>>>>>
const toolbox = await r.run('foo')
t.truthy(toolbox.command)
t.is(toolbox.command.name, 'foo') |
<<<<<<<
id: string;
title: string;
description: string;
updated: any; // firebase.firestore.Timestamp | firebase.firestore.FieldValue
created: any; // firebase.firestore.Timestamp | firebase.firestore.FieldValue
}
export interface ThemeTemplateQueryOptions {
limit?: number;
orderBy?: {
field: string,
sortOrder: 'asc' | 'desc',
};
startAfter?: any; // firebase.firestore.DocumentSnapshot
=======
id: string;
title: string;
description: string;
updated: any; // firebase.firestore.Timestamp | firebase.firestore.FieldValue
created: any; // firebase.firestore.Timestamp | firebase.firestore.FieldValue
}
export interface ThemeAssetQueryOptions {
limit?: number;
orderBy?: {
field: string,
sortOrder: 'asc' | 'desc',
};
startAfter?: any; // firebase.firestore.DocumentSnapshot
>>>>>>>
id: string;
title: string;
description: string;
updated: any; // firebase.firestore.Timestamp | firebase.firestore.FieldValue
created: any; // firebase.firestore.Timestamp | firebase.firestore.FieldValue
}
export interface ThemeTemplateQueryOptions {
limit?: number;
orderBy?: {
field: string,
sortOrder: 'asc' | 'desc',
};
startAfter?: any; // firebase.firestore.DocumentSnapshot
}
export interface ThemeAssetQueryOptions {
limit?: number;
orderBy?: {
field: string,
sortOrder: 'asc' | 'desc',
};
startAfter?: any; // firebase.firestore.DocumentSnapshot |
<<<<<<<
import { register } from '../packages/hadron-events';
import ICallbackEvent from '../packages/hadron-events/src/ICallbackEvent';
=======
import { register as serializerRegister, schemaProvider, ISerializerConfig } from '../packages/hadron-serialization';
>>>>>>>
import { register } from '../packages/hadron-events';
import ICallbackEvent from '../packages/hadron-events/src/ICallbackEvent';
import { register as serializerRegister, schemaProvider, ISerializerConfig } from '../packages/hadron-serialization'; |
<<<<<<<
return createConnection(connection)
.then(connection => registerConnection(container, connection))
.then((connection: Connection) => {
const entities = config.connection.entities || config.connection.entitySchemas || [];
registerRepositories(container, connection, entities);
return connection;
})
.catch(err => {
console.error(err);
=======
return createConnections(connectionArray).then(async (connections) => {
// Register repositories inside container
entityArray.forEach((entity: any) => {
container.register(
REPOSITORY_NAMES(entity.name),
connections[0].getRepository(entity),
);
>>>>>>>
return createConnection(connection)
.then((connection) => registerConnection(container, connection))
.then((connection: Connection) => {
const entities =
config.connection.entities || config.connection.entitySchemas || [];
registerRepositories(container, connection, entities);
return connection;
})
.catch((err) => {
console.error(err);
<<<<<<<
}
=======
// Register connections inside container
container.register(CONNECTIONS, connections);
});
};
>>>>>>>
}; |
<<<<<<<
import eventsManagerProvider from './src/eventsMaganerProvider';
=======
import eventsManagerProvider from './src/eventsManagerProvider';
export * from './src/constants';
>>>>>>>
import eventsManagerProvider from './src/eventsManagerProvider';
<<<<<<<
if (container.take('event-emitter') === null) {
container.register('event-emitter', EventEmitter, Lifetime.Singletone);
=======
if (container.take(EVENT_EMITTER) === null) {
container.register(EVENT_EMITTER, new EventEmitter());
>>>>>>>
if (container.take('event-emitter') === null) {
container.register('event-emitter', EventEmitter, Lifetime.Singletone);
<<<<<<<
container.take('event-emitter'),
=======
container.take(EVENT_EMITTER),
>>>>>>>
container.take('event-emitter'),
<<<<<<<
container.register('events-manager', eventsManager);
=======
container.register(EVENTS_MANAGER, eventsManager);
>>>>>>>
container.register('events-manager', eventsManager); |
<<<<<<<
import { ConnectionOptions, createConnection } from 'typeorm';
import { Container as container } from '../../packages/hadron-core';
=======
import container from '../containers/container';
>>>>>>>
import { Container as container } from '../../packages/hadron-core'; |
<<<<<<<
import GRU from './recurrent/gru';
import GRUTimeStep from './recurrent/gru-time-step';
import { LSTM } from './recurrent/lstm';
import { LSTMTimeStep } from './recurrent/lstm-time-step';
=======
import { GRU } from './recurrent/gru';
import { GRUTimeStep } from './recurrent/gru-time-step';
import LSTM from './recurrent/lstm';
import LSTMTimeStep from './recurrent/lstm-time-step';
>>>>>>>
import { GRU } from './recurrent/gru';
import { GRUTimeStep } from './recurrent/gru-time-step';
import { LSTM } from './recurrent/lstm';
import { LSTMTimeStep } from './recurrent/lstm-time-step'; |
<<<<<<<
fromBytes(tx: IBytesTransaction): IBaseTransaction<any>;
=======
/**
* Attach Asset object to each transaction passed
* @param {Array<IConfirmedTransaction<any>>} txs
* @return {Promise<void>}
*/
attachAssets(txs: Array<IConfirmedTransaction<any>>): Promise<void>;
>>>>>>>
fromBytes(tx: IBytesTransaction): IBaseTransaction<any>;
/**
* Attach Asset object to each transaction passed
* @param {Array<IConfirmedTransaction<any>>} txs
* @return {Promise<void>}
*/
attachAssets(txs: Array<IConfirmedTransaction<any>>): Promise<void>; |
<<<<<<<
/**
* Calculates block id.
* @param {BlockType} block
* @param {Buffer} fromBytes
* @returns {string}
*/
public static getId(block: BlockType, fromBytes?: Buffer): string {
const bytes = fromBytes ? fromBytes : this.getBytes(block);
const hash = crypto.createHash('sha256').update(bytes).digest();
const temp = Buffer.alloc(8);
for (let i = 0; i < 8; i++) {
temp[i] = hash[7 - i];
}
return BigNum.fromBuffer(temp).toString();
}
public static getHash(block: BlockType, includeSignature: boolean = true) {
return crypto.createHash('sha256')
.update(this.getBytes(block, includeSignature))
.digest();
}
public static getBytes(block: BlockType | SignedBlockType, includeSignature: boolean = true): Buffer {
const size = 4 + 4 + 8 + 4 + 4 + 8 + 8 + 4 + 4 + 4 + 32 + 32 + 64;
const bb = new ByteBuffer(size, true /* little endian */);
bb.writeInt(block.version);
bb.writeInt(block.timestamp);
if (block.previousBlock) {
const pb = new BigNum(block.previousBlock)
.toBuffer({ size: 8 });
for (let i = 0; i < 8; i++) {
bb.writeByte(pb[i]);
}
} else {
for (let i = 0; i < 8; i++) {
bb.writeByte(0);
}
}
bb.writeInt(block.numberOfTransactions);
// tslint:disable no-string-literal
bb['writeLong'](block.totalAmount);
bb['writeLong'](block.totalFee);
bb['writeLong'](block.reward);
// tslint:enable no-string-literal
bb.writeInt(block.payloadLength);
const payloadHashBuffer = block.payloadHash;
// tslint:disable-next-line
for (let i = 0; i < payloadHashBuffer.length; i++) {
bb.writeByte(payloadHashBuffer[i]);
}
const generatorPublicKeyBuffer = block.generatorPublicKey;
// tslint:disable-next-line
for (let i = 0; i < generatorPublicKeyBuffer.length; i++) {
bb.writeByte(generatorPublicKeyBuffer[i]);
}
if (typeof((block as SignedBlockType).blockSignature) !== 'undefined' && includeSignature) {
const blockSignatureBuffer = (block as SignedBlockType).blockSignature;
// tslint:disable-next-line
for (let i = 0; i < blockSignatureBuffer.length; i++) {
bb.writeByte(blockSignatureBuffer[i]);
}
}
bb.flip();
return bb.toBuffer() as any;
}
private static getAddressByPublicKey(publicKey: Buffer | string) {
if (typeof(publicKey) === 'string') {
publicKey = new Buffer(publicKey, 'hex');
}
const publicKeyHash = crypto.createHash('sha256')
.update(publicKey).digest();
const temp = Buffer.alloc(8);
for (let i = 0; i < 8; i++) {
temp[i] = publicKeyHash[7 - i];
}
return `${BigNum.fromBuffer(temp).toString()}R`;
}
=======
>>>>>>>
<<<<<<<
/**
* Restores a block from its bytes
*/
public fromBytes(blk: IBytesBlock): SignedBlockType {
const bb = ByteBuffer.wrap(blk.bytes, 'binary', true);
const version = bb.readInt(0);
const timestamp = bb.readInt(4);
// PreviousBlock is valid only if it's not 8 bytes with 0 value
const previousIdBytes = bb.copy(8, 16);
let previousValid = false;
for (let i = 0; i < 8; i++) {
if (previousIdBytes.readByte(i) !== 0) {
previousValid = true;
break;
}
}
const previousBlock = previousValid ?
BigNum.fromBuffer(previousIdBytes.toBuffer() as any).toString() : null;
const numberOfTransactions = bb.readInt(16);
const totalAmount = bb.readLong(20).toNumber();
const totalFee = bb.readLong(28).toNumber();
const reward = bb.readLong(36).toNumber();
const payloadLength = bb.readInt(44);
const payloadHash = bb.copy(48, 80).toBuffer() as any;
const generatorPublicKey = bb.copy(80, 112).toBuffer() as any;
const blockSignature = bb.buffer.length === 176 ? bb.copy(112, 176).toBuffer() as any : null;
const id = BlockLogic.getId(null, blk.bytes);
const transactions = blk.transactions.map((tx) => {
const baseTx = this.transaction.fromBytes(tx);
return {
...baseTx,
blockId: id,
height: blk.height,
senderId: BlockLogic.getAddressByPublicKey(baseTx.senderPublicKey)
};
});
// tslint:disable object-literal-sort-keys
return {
id,
version,
timestamp,
previousBlock,
numberOfTransactions,
totalAmount,
totalFee,
reward,
payloadLength,
payloadHash,
generatorPublicKey,
blockSignature,
transactions,
height: blk.height,
};
}
=======
/**
* Calculates block id.
* @param {BlockType} block
* @returns {string}
*/
public getId(block: BlockType): string {
const hash = crypto.createHash('sha256').update(this.getBytes(block)).digest();
const temp = Buffer.alloc(8);
for (let i = 0; i < 8; i++) {
temp[i] = hash[7 - i];
}
return BigNum.fromBuffer(temp).toString();
}
public getHash(block: BlockType, includeSignature: boolean = true) {
return crypto.createHash('sha256')
.update(this.getBytes(block, includeSignature))
.digest();
}
public getBytes(block: BlockType | SignedBlockType, includeSignature: boolean = true): Buffer {
const size = 4 + 4 + 8 + 4 + 4 + 8 + 8 + 4 + 4 + 4 + 32 + 32 + 64;
const bb = new ByteBuffer(size, true /* little endian */);
bb.writeInt(block.version);
bb.writeInt(block.timestamp);
if (block.previousBlock) {
const pb = new BigNum(block.previousBlock)
.toBuffer({ size: 8 });
for (let i = 0; i < 8; i++) {
bb.writeByte(pb[i]);
}
} else {
for (let i = 0; i < 8; i++) {
bb.writeByte(0);
}
}
bb.writeInt(block.numberOfTransactions);
// tslint:disable no-string-literal
bb['writeLong'](block.totalAmount);
bb['writeLong'](block.totalFee);
bb['writeLong'](block.reward);
// tslint:enable no-string-literal
bb.writeInt(block.payloadLength);
const payloadHashBuffer = block.payloadHash;
// tslint:disable-next-line
for (let i = 0; i < payloadHashBuffer.length; i++) {
bb.writeByte(payloadHashBuffer[i]);
}
const generatorPublicKeyBuffer = block.generatorPublicKey;
// tslint:disable-next-line
for (let i = 0; i < generatorPublicKeyBuffer.length; i++) {
bb.writeByte(generatorPublicKeyBuffer[i]);
}
if (typeof((block as SignedBlockType).blockSignature) !== 'undefined' && includeSignature) {
const blockSignatureBuffer = (block as SignedBlockType).blockSignature;
// tslint:disable-next-line
for (let i = 0; i < blockSignatureBuffer.length; i++) {
bb.writeByte(blockSignatureBuffer[i]);
}
}
bb.flip();
return bb.toBuffer() as any;
}
private getAddressByPublicKey(publicKey: Buffer | string) {
if (typeof(publicKey) === 'string') {
publicKey = new Buffer(publicKey, 'hex');
}
const publicKeyHash = crypto.createHash('sha256')
.update(publicKey).digest();
const temp = Buffer.alloc(8);
for (let i = 0; i < 8; i++) {
temp[i] = publicKeyHash[7 - i];
}
return `${BigNum.fromBuffer(temp).toString()}R`;
}
>>>>>>>
/**
* Calculates block id.
* @param {BlockType} block
* @returns {string}
*/
public getId(block: BlockType, fromBytes?: Buffer): string {
const bytes = fromBytes ? fromBytes : this.getBytes(block);
const hash = crypto.createHash('sha256').update(bytes).digest(); const temp = Buffer.alloc(8);
for (let i = 0; i < 8; i++) {
temp[i] = hash[7 - i];
}
return BigNum.fromBuffer(temp).toString();
}
public getHash(block: BlockType, includeSignature: boolean = true) {
return crypto.createHash('sha256')
.update(this.getBytes(block, includeSignature))
.digest();
}
public getBytes(block: BlockType | SignedBlockType, includeSignature: boolean = true): Buffer {
const size = 4 + 4 + 8 + 4 + 4 + 8 + 8 + 4 + 4 + 4 + 32 + 32 + 64;
const bb = new ByteBuffer(size, true /* little endian */);
bb.writeInt(block.version);
bb.writeInt(block.timestamp);
if (block.previousBlock) {
const pb = new BigNum(block.previousBlock)
.toBuffer({ size: 8 });
for (let i = 0; i < 8; i++) {
bb.writeByte(pb[i]);
}
} else {
for (let i = 0; i < 8; i++) {
bb.writeByte(0);
}
}
bb.writeInt(block.numberOfTransactions);
// tslint:disable no-string-literal
bb['writeLong'](block.totalAmount);
bb['writeLong'](block.totalFee);
bb['writeLong'](block.reward);
// tslint:enable no-string-literal
bb.writeInt(block.payloadLength);
const payloadHashBuffer = block.payloadHash;
// tslint:disable-next-line
for (let i = 0; i < payloadHashBuffer.length; i++) {
bb.writeByte(payloadHashBuffer[i]);
}
const generatorPublicKeyBuffer = block.generatorPublicKey;
// tslint:disable-next-line
for (let i = 0; i < generatorPublicKeyBuffer.length; i++) {
bb.writeByte(generatorPublicKeyBuffer[i]);
}
if (typeof((block as SignedBlockType).blockSignature) !== 'undefined' && includeSignature) {
const blockSignatureBuffer = (block as SignedBlockType).blockSignature;
// tslint:disable-next-line
for (let i = 0; i < blockSignatureBuffer.length; i++) {
bb.writeByte(blockSignatureBuffer[i]);
}
}
bb.flip();
return bb.toBuffer() as any;
}
private getAddressByPublicKey(publicKey: Buffer | string) {
if (typeof(publicKey) === 'string') {
publicKey = new Buffer(publicKey, 'hex');
}
const publicKeyHash = crypto.createHash('sha256')
.update(publicKey).digest();
const temp = Buffer.alloc(8);
for (let i = 0; i < 8; i++) {
temp[i] = publicKeyHash[7 - i];
}
return `${BigNum.fromBuffer(temp).toString()}R`;
}
/**
* Restores a block from its bytes
*/
public fromBytes(blk: IBytesBlock): SignedBlockType {
const bb = ByteBuffer.wrap(blk.bytes, 'binary', true);
const version = bb.readInt(0);
const timestamp = bb.readInt(4);
// PreviousBlock is valid only if it's not 8 bytes with 0 value
const previousIdBytes = bb.copy(8, 16);
let previousValid = false;
for (let i = 0; i < 8; i++) {
if (previousIdBytes.readByte(i) !== 0) {
previousValid = true;
break;
}
}
const previousBlock = previousValid ?
BigNum.fromBuffer(previousIdBytes.toBuffer() as any).toString() : null;
const numberOfTransactions = bb.readInt(16);
const totalAmount = bb.readLong(20).toNumber();
const totalFee = bb.readLong(28).toNumber();
const reward = bb.readLong(36).toNumber();
const payloadLength = bb.readInt(44);
const payloadHash = bb.copy(48, 80).toBuffer() as any;
const generatorPublicKey = bb.copy(80, 112).toBuffer() as any;
const blockSignature = bb.buffer.length === 176 ? bb.copy(112, 176).toBuffer() as any : null;
const id = this.getId(null, blk.bytes);
const transactions = blk.transactions.map((tx) => {
const baseTx = this.transaction.fromBytes(tx);
return {
...baseTx,
blockId: id,
height: blk.height,
senderId: this.getAddressByPublicKey(baseTx.senderPublicKey)
};
});
// tslint:disable object-literal-sort-keys
return {
id,
version,
timestamp,
previousBlock,
numberOfTransactions,
totalAmount,
totalFee,
reward,
payloadLength,
payloadHash,
generatorPublicKey,
blockSignature,
transactions,
height: blk.height,
};
} |
<<<<<<<
=======
LoaderModuleRewire.__set__('promiseRetry', promiseRetryStub);
>>>>>>>
<<<<<<<
(instance as any).sequence.addAndPromise = sandbox.stub().callsFake((w) => Promise.resolve(w()));
=======
(instance as any).defaultSequence.addAndPromise = sandbox.stub().callsFake(w => Promise.resolve(w()));
>>>>>>>
(instance as any).defaultSequence.addAndPromise = sandbox.stub().callsFake(w => Promise.resolve(w())); |
<<<<<<<
TransactionPoolStub,
TransactionsModuleStub
=======
TransactionsModuleStub,
>>>>>>>
TransactionPoolStub,
TransactionsModuleStub, |
<<<<<<<
import {
doubleFollow,
flushAndRunMultipleServers,
flushTests,
killallServers,
makeActivityPubGetRequest,
runServer,
ServerInfo,
setAccessTokensToServers, uploadVideo
} from '../../utils'
=======
import {
flushTests,
killallServers,
makeActivityPubGetRequest,
runServer,
ServerInfo,
setAccessTokensToServers
} from '../../../../shared/utils'
>>>>>>>
import {
doubleFollow,
flushAndRunMultipleServers,
flushTests,
killallServers,
makeActivityPubGetRequest,
ServerInfo,
setAccessTokensToServers,
uploadVideo
} from '../../../../shared/utils' |
<<<<<<<
sendNotification (userId: number, notification: UserNotificationModel) {
const sockets = this.userNotificationSockets[userId]
=======
sendNotification (userId: number, notification: UserNotificationModelForApi) {
const socket = this.userNotificationSockets[userId]
>>>>>>>
sendNotification (userId: number, notification: UserNotificationModelForApi) {
const sockets = this.userNotificationSockets[userId] |
<<<<<<<
body('originallyPublishedAt')
.optional()
.customSanitizer(toValueOrNull)
.custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'),
=======
body('downloadEnabled')
.optional()
.toBoolean()
.custom(isBooleanValid).withMessage('Should have downloading enabled boolean'),
>>>>>>>
body('downloadEnabled')
.optional()
.toBoolean()
.custom(isBooleanValid).withMessage('Should have downloading enabled boolean'),
body('originallyPublishedAt')
.optional()
.customSanitizer(toValueOrNull)
.custom(isVideoOriginallyPublishedAtValid).withMessage('Should have a valid original publication date'), |
<<<<<<<
const label = d.id === 0
? this.player().localize('Audio-only')
=======
const label = d.label === '0p'
? this.player.localize('Audio-only')
>>>>>>>
const label = d.label === '0p'
? this.player().localize('Audio-only') |
<<<<<<<
=======
// Thanks: https://github.com/przemyslawpluta/node-youtube-dl/blob/master/lib/downloader.js
// We rewrote it to avoid sync calls
async function updateYoutubeDLBinary () {
logger.info('Updating youtubeDL binary.')
const binDirectory = join(root(), 'node_modules', 'youtube-dl', 'bin')
const bin = join(binDirectory, 'youtube-dl')
const detailsPath = join(binDirectory, 'details')
const url = 'https://yt-dl.org/downloads/latest/youtube-dl'
await ensureDir(binDirectory)
return new Promise(res => {
request.get(url, { followRedirect: false }, (err, result) => {
if (err) {
logger.error('Cannot update youtube-dl.', { err })
return res()
}
if (result.statusCode !== 302) {
logger.error('youtube-dl update error: did not get redirect for the latest version link. Status %d', result.statusCode)
return res()
}
const url = result.headers.location
const downloadFile = request.get(url)
const newVersion = /yt-dl\.org\/downloads\/(\d{4}\.\d\d\.\d\d(\.\d)?)\/youtube-dl/.exec(url)[ 1 ]
downloadFile.on('response', result => {
if (result.statusCode !== 200) {
logger.error('Cannot update youtube-dl: new version response is not 200, it\'s %d.', result.statusCode)
return res()
}
downloadFile.pipe(createWriteStream(bin, { mode: 493 }))
})
downloadFile.on('error', err => {
logger.error('youtube-dl update error.', { err })
return res()
})
downloadFile.on('end', () => {
const details = JSON.stringify({ version: newVersion, path: bin, exec: 'youtube-dl' })
writeFile(detailsPath, details, { encoding: 'utf8' }, err => {
if (err) {
logger.error('youtube-dl update error: cannot write details.', { err })
return res()
}
logger.info('youtube-dl updated to version %s.', newVersion)
return res()
})
})
})
})
}
// ---------------------------------------------------------------------------
export {
updateYoutubeDLBinary,
downloadYoutubeDLVideo,
getYoutubeDLInfo
}
// ---------------------------------------------------------------------------
>>>>>>>
// Thanks: https://github.com/przemyslawpluta/node-youtube-dl/blob/master/lib/downloader.js
// We rewrote it to avoid sync calls
async function updateYoutubeDLBinary () {
logger.info('Updating youtubeDL binary.')
const binDirectory = join(root(), 'node_modules', 'youtube-dl', 'bin')
const bin = join(binDirectory, 'youtube-dl')
const detailsPath = join(binDirectory, 'details')
const url = 'https://yt-dl.org/downloads/latest/youtube-dl'
await ensureDir(binDirectory)
return new Promise(res => {
request.get(url, { followRedirect: false }, (err, result) => {
if (err) {
logger.error('Cannot update youtube-dl.', { err })
return res()
}
if (result.statusCode !== 302) {
logger.error('youtube-dl update error: did not get redirect for the latest version link. Status %d', result.statusCode)
return res()
}
const url = result.headers.location
const downloadFile = request.get(url)
const newVersion = /yt-dl\.org\/downloads\/(\d{4}\.\d\d\.\d\d(\.\d)?)\/youtube-dl/.exec(url)[ 1 ]
downloadFile.on('response', result => {
if (result.statusCode !== 200) {
logger.error('Cannot update youtube-dl: new version response is not 200, it\'s %d.', result.statusCode)
return res()
}
downloadFile.pipe(createWriteStream(bin, { mode: 493 }))
})
downloadFile.on('error', err => {
logger.error('youtube-dl update error.', { err })
return res()
})
downloadFile.on('end', () => {
const details = JSON.stringify({ version: newVersion, path: bin, exec: 'youtube-dl' })
writeFile(detailsPath, details, { encoding: 'utf8' }, err => {
if (err) {
logger.error('youtube-dl update error: cannot write details.', { err })
return res()
}
logger.info('youtube-dl updated to version %s.', newVersion)
return res()
})
})
})
})
} |
<<<<<<<
import { RichTextEditor } from '../cell_editors/richTextEditor.js'
=======
import { urlContains } from '../utils'
>>>>>>>
import { RichTextEditor } from '../cell_editors/richTextEditor.js'
import { urlContains } from '../utils' |
<<<<<<<
constructor(private urlMapper: UrlMapper) { }
public addIpToBanList = (rule: IPRuleContract, callback: (result: boolean) => void) => {
return $.post(this.urlMapper.mapRelative("/api/admin/permBannedIPs"), rule, callback);
=======
public addIpToBanList = (rule: vdb.viewModels.IPRuleContract, callback: (result: boolean) => void) => {
return $.post(this.urlMapper.mapRelative("/api/ip-rules"), rule, callback);
>>>>>>>
constructor(private urlMapper: UrlMapper) { }
public addIpToBanList = (rule: IPRuleContract, callback: (result: boolean) => void) => {
return $.post(this.urlMapper.mapRelative("/api/ip-rules"), rule, callback); |
<<<<<<<
import ArtistContract from '../../DataContracts/Artist/ArtistContract';
import FakeArtistRepository from '../TestSupport/FakeArtistRepository';
import FakeSongRepository from '../TestSupport/FakeSongRepository';
import ResourceRepository from '../../Repositories/ResourceRepository';
import SongCreateViewModel from '../../ViewModels/SongCreateViewModel';
import TagRepository from '../../Repositories/TagRepository';
//module vdb.tests.viewModels {
var repository = new FakeSongRepository();
var artistRepository = new FakeArtistRepository();
var tagRepository: TagRepository = null;
var resourceRepository: ResourceRepository = null;
var producer: ArtistContract = { artistType: "Producer", id: 1, name: "Tripshots", additionalNames: "" };
=======
module vdb.tests.viewModels {
import vm = vdb.viewModels;
import dc = vdb.dataContracts;
var repository = new vdb.tests.testSupport.FakeSongRepository();
var artistRepository = new vdb.tests.testSupport.FakeArtistRepository();
var tagRepository: vdb.repositories.TagRepository = null;
var producer: dc.ArtistContract = { artistType: "Producer", id: 1, name: "Tripshots", additionalNames: "" };
>>>>>>>
import ArtistContract from '../../DataContracts/Artist/ArtistContract';
import FakeArtistRepository from '../TestSupport/FakeArtistRepository';
import FakeSongRepository from '../TestSupport/FakeSongRepository';
import SongCreateViewModel from '../../ViewModels/SongCreateViewModel';
import TagRepository from '../../Repositories/TagRepository';
//module vdb.tests.viewModels {
var repository = new FakeSongRepository();
var artistRepository = new FakeArtistRepository();
var tagRepository: TagRepository = null;
var producer: ArtistContract = { artistType: "Producer", id: 1, name: "Tripshots", additionalNames: "" };
<<<<<<<
return new SongCreateViewModel(repository, artistRepository, resourceRepository, tagRepository, 'en-US');
=======
return new vm.SongCreateViewModel(repository, artistRepository, tagRepository);
>>>>>>>
return new SongCreateViewModel(repository, artistRepository, tagRepository);
<<<<<<<
var target = new SongCreateViewModel(repository, artistRepository, resourceRepository, tagRepository, 'en-US', { nameEnglish: "Nebula", artists: [producer] });
=======
var target = new vm.SongCreateViewModel(repository, artistRepository, tagRepository, { nameEnglish: "Nebula", artists: [producer] });
>>>>>>>
var target = new SongCreateViewModel(repository, artistRepository, tagRepository, { nameEnglish: "Nebula", artists: [producer] }); |
<<<<<<<
export interface IWindowSettings {
openFilesInNewWindow: boolean;
reopenFolders: 'all' | 'one' | 'none';
restoreFullscreen: boolean;
zoomLevel: number;
titleBarStyle: 'native' | 'custom';
}
export class VSCodeWindow implements IVSCodeWindow {
=======
export class VSCodeWindow {
>>>>>>>
export class VSCodeWindow implements IVSCodeWindow { |
<<<<<<<
import {ListenerUnbind} from 'vs/base/common/eventEmitter';
import {Keybinding} from 'vs/base/common/keyCodes';
=======
>>>>>>>
import {Keybinding} from 'vs/base/common/keyCodes'; |
<<<<<<<
import ActionsRenderer = require('vs/base/parts/tree/browser/actionsRenderer');
import Actions = require('vs/base/common/actions');
import {compareAnything} from 'vs/base/common/comparers';
import ActionBar = require('vs/base/browser/ui/actionbar/actionbar');
import TreeDefaults = require('vs/base/parts/tree/browser/treeDefaults');
import HighlightedLabel = require('vs/base/browser/ui/highlightedlabel/highlightedLabel');
import {OcticonLabel} from 'vs/base/browser/ui/octiconLabel/octiconLabel';
=======
import {IActionProvider} from 'vs/base/parts/tree/browser/actionsRenderer';
import {Action, IAction, IActionRunner} from 'vs/base/common/actions';
import {compareAnything, compareByPrefix} from 'vs/base/common/comparers';
import {ActionBar, IActionItem} from 'vs/base/browser/ui/actionbar/actionbar';
import {LegacyRenderer, ILegacyTemplateData} from 'vs/base/parts/tree/browser/treeDefaults';
import {HighlightedLabel} from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
>>>>>>>
import {IActionProvider} from 'vs/base/parts/tree/browser/actionsRenderer';
import {Action, IAction, IActionRunner} from 'vs/base/common/actions';
import {compareAnything, compareByPrefix} from 'vs/base/common/comparers';
import {ActionBar, IActionItem} from 'vs/base/browser/ui/actionbar/actionbar';
import {LegacyRenderer, ILegacyTemplateData} from 'vs/base/parts/tree/browser/treeDefaults';
import {HighlightedLabel} from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
import {OcticonLabel} from 'vs/base/browser/ui/octiconLabel/octiconLabel';
<<<<<<<
label: HighlightedLabel.HighlightedLabel;
meta: OcticonLabel;
description: HighlightedLabel.HighlightedLabel;
actionBar: ActionBar.ActionBar;
=======
label: HighlightedLabel;
meta: HTMLSpanElement;
description: HighlightedLabel;
actionBar: ActionBar;
>>>>>>>
label: HighlightedLabel;
meta: OcticonLabel;
description: HighlightedLabel;
actionBar: ActionBar; |
<<<<<<<
if (resource.scheme === 'file') {
content = `${resource.fsPath}\n${content}`;
}
return this.fileService.updateContent(backupResource, content, BACKUP_FILE_UPDATE_OPTIONS).then(() => void 0);
=======
if (model.has(backupResource, versionId)) {
return void 0; // return early if backup version id matches requested one
}
return this.fileService.updateContent(backupResource, content, BACKUP_FILE_UPDATE_OPTIONS).then(() => model.add(backupResource, versionId));
});
>>>>>>>
if (model.has(backupResource, versionId)) {
return void 0; // return early if backup version id matches requested one
}
if (resource.scheme === 'file') {
content = `${resource.fsPath}\n${content}`;
}
return this.fileService.updateContent(backupResource, content, BACKUP_FILE_UPDATE_OPTIONS).then(() => model.add(backupResource, versionId));
}); |
<<<<<<<
import { InternalTreeExplorerNode } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel';
=======
export interface IEnvironment {
appSettingsHome: string;
disableExtensions: boolean;
userExtensionsHome: string;
extensionDevelopmentPath: string;
extensionTestsPath: string;
}
export interface IInitConfiguration {
_initConfigurationBrand: void;
}
export interface IInitData {
parentPid: number;
environment: IEnvironment;
contextService: {
workspace: IWorkspace;
};
extensions: IExtensionDescription[];
configuration: IInitConfiguration;
telemetryInfo: ITelemetryInfo;
}
>>>>>>>
import { InternalTreeExplorerNode } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel';
export interface IEnvironment {
appSettingsHome: string;
disableExtensions: boolean;
userExtensionsHome: string;
extensionDevelopmentPath: string;
extensionTestsPath: string;
}
export interface IInitConfiguration {
_initConfigurationBrand: void;
}
export interface IInitData {
parentPid: number;
environment: IEnvironment;
contextService: {
workspace: IWorkspace;
};
extensions: IExtensionDescription[];
configuration: IInitConfiguration;
telemetryInfo: ITelemetryInfo;
} |
<<<<<<<
this._styleSheet = dom.createStyleSheet();
this._decorationOptionProviders = Object.create(null);
=======
this._styleSheet = styleSheet;
this._decorationRenderOptions = Object.create(null);
>>>>>>>
this._styleSheet = styleSheet;
this._decorationOptionProviders = Object.create(null);
<<<<<<<
contentText: 'content:\'{0}\';',
contentIconPath: 'content:url(\'{0}\')',
margin: 'margin:{0};',
width: 'width:{0};',
height: 'height:{0};'
=======
gutterIconSize: 'background-size:{0};',
>>>>>>>
gutterIconSize: 'background-size:{0};',
contentText: 'content:\'{0}\';',
contentIconPath: 'content:url(\'{0}\')',
margin: 'margin:{0};',
width: 'width:{0};',
height: 'height:{0};' |
<<<<<<<
private getConflictsOrEmpty(document: vscode.TextDocument): interfaces.IDocumentMergeConflict[] {
=======
private getConflictsOrEmpty(document: vscode.TextDocument, origins: string[]): interfaces.IDocumentMergeConflict[] {
let stepStart = process.hrtime();
>>>>>>>
private getConflictsOrEmpty(document: vscode.TextDocument, origins: string[]): interfaces.IDocumentMergeConflict[] {
<<<<<<<
=======
let stepEnd = process.hrtime(stepStart);
console.info('[%s] %s -> Check document execution time: %dms', origins.join(', '), document.uri.toString(), stepEnd[1] / 1000000);
>>>>>>>
<<<<<<<
=======
stepEnd = process.hrtime(stepStart);
console.info('[%s] %s -> Find conflict regions execution time: %dms', origins.join(', '), document.uri.toString(), stepEnd[1] / 1000000);
>>>>>>> |
<<<<<<<
// test('TerminalService - createTerminalEnv', function () {
// const shell1 = {
// executable: '/bin/foosh',
// args: ['-bar', 'baz']
// };
// const parentEnv1: IStringDictionary<string> = <any>{
// ok: true
// };
// const env1 = TerminalService.createTerminalEnv(parentEnv1, shell1, null, 'en-au');
// assert.ok(env1['ok'], 'Parent environment is copied');
// assert.deepStrictEqual(parentEnv1, { ok: true }, 'Parent environment is unchanged');
// assert.equal(env1['PTYPID'], process.pid.toString(), 'PTYPID is equal to the current PID');
// assert.equal(env1['PTYSHELL'], '/bin/foosh', 'PTYSHELL is equal to the requested shell');
// assert.equal(env1['PTYSHELLARG0'], '-bar', 'PTYSHELLARG0 is equal to the first shell argument');
// assert.equal(env1['PTYSHELLARG1'], 'baz', 'PTYSHELLARG1 is equal to the first shell argument');
// assert.ok(!('PTYSHELLARG2' in env1), 'PTYSHELLARG2 is unset');
// assert.equal(env1['PTYCWD'], os.homedir(), 'PTYCWD is equal to the home folder');
// assert.equal(env1['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
// const shell2 = {
// executable: '/bin/foosh',
// args: []
// };
// const parentEnv2: IStringDictionary<string> = <any>{
// LANG: 'en_US.UTF-8'
// };
// const workspace2: IWorkspace = <any>{
// resource: {
// fsPath: '/my/dev/folder'
// }
// };
// const env2 = TerminalService.createTerminalEnv(parentEnv2, shell2, workspace2, 'en-au');
// assert.ok(!('PTYSHELLARG0' in env2), 'PTYSHELLARG0 is unset');
// assert.equal(env2['PTYCWD'], '/my/dev/folder', 'PTYCWD is equal to the workspace folder');
// assert.equal(env2['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
// const env3 = TerminalService.createTerminalEnv(parentEnv1, shell1, null, null);
// assert.ok(!('LANG' in env3), 'LANG is unset');
// const env4 = TerminalService.createTerminalEnv(parentEnv2, shell1, null, null);
// assert.equal(env4['LANG'], 'en_US.UTF-8', 'LANG is equal to the parent environment\'s LANG');
// });
=======
test('TerminalService - createTerminalEnv', function () {
const shell1 = {
executable: '/bin/foosh',
args: ['-bar', 'baz']
};
const parentEnv1: IStringDictionary<string> = <any>{
ok: true
};
const env1 = TerminalService.createTerminalEnv(parentEnv1, shell1, null, 'en-au');
assert.ok(env1['ok'], 'Parent environment is copied');
assert.deepStrictEqual(parentEnv1, { ok: true }, 'Parent environment is unchanged');
assert.equal(env1['PTYPID'], process.pid.toString(), 'PTYPID is equal to the current PID');
assert.equal(env1['PTYSHELL'], '/bin/foosh', 'PTYSHELL is equal to the provided shell');
assert.equal(env1['PTYSHELLARG0'], '-bar', 'PTYSHELLARG0 is equal to the first shell argument');
assert.equal(env1['PTYSHELLARG1'], 'baz', 'PTYSHELLARG1 is equal to the first shell argument');
assert.ok(!('PTYSHELLARG2' in env1), 'PTYSHELLARG2 is unset');
assert.equal(env1['PTYCWD'], os.homedir(), 'PTYCWD is equal to the home folder');
assert.equal(env1['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
const shell2 = {
executable: '/bin/foosh',
args: []
};
const parentEnv2: IStringDictionary<string> = <any>{
LANG: 'en_US.UTF-8'
};
const workspace2: IWorkspace = <any>{
resource: {
fsPath: '/my/dev/folder'
}
};
const env2 = TerminalService.createTerminalEnv(parentEnv2, shell2, workspace2, 'en-au');
assert.ok(!('PTYSHELLARG0' in env2), 'PTYSHELLARG0 is unset');
assert.equal(env2['PTYCWD'], '/my/dev/folder', 'PTYCWD is equal to the workspace folder');
assert.equal(env2['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
const env3 = TerminalService.createTerminalEnv(parentEnv1, shell1, null, null);
assert.ok(!('LANG' in env3), 'LANG is unset');
const env4 = TerminalService.createTerminalEnv(parentEnv2, shell1, null, null);
assert.equal(env4['LANG'], 'en_US.UTF-8', 'LANG is equal to the parent environment\'s LANG');
});
>>>>>>>
// test('TerminalService - createTerminalEnv', function () {
// const shell1 = {
// executable: '/bin/foosh',
// args: ['-bar', 'baz']
// };
// const parentEnv1: IStringDictionary<string> = <any>{
// ok: true
// };
// const env1 = TerminalService.createTerminalEnv(parentEnv1, shell1, null, 'en-au');
// assert.ok(env1['ok'], 'Parent environment is copied');
// assert.deepStrictEqual(parentEnv1, { ok: true }, 'Parent environment is unchanged');
// assert.equal(env1['PTYPID'], process.pid.toString(), 'PTYPID is equal to the current PID');
// assert.equal(env1['PTYSHELL'], '/bin/foosh', 'PTYSHELL is equal to the provided shell');
// assert.equal(env1['PTYSHELLARG0'], '-bar', 'PTYSHELLARG0 is equal to the first shell argument');
// assert.equal(env1['PTYSHELLARG1'], 'baz', 'PTYSHELLARG1 is equal to the first shell argument');
// assert.ok(!('PTYSHELLARG2' in env1), 'PTYSHELLARG2 is unset');
// assert.equal(env1['PTYCWD'], os.homedir(), 'PTYCWD is equal to the home folder');
// assert.equal(env1['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
// const shell2 = {
// executable: '/bin/foosh',
// args: []
// };
// const parentEnv2: IStringDictionary<string> = <any>{
// LANG: 'en_US.UTF-8'
// };
// const workspace2: IWorkspace = <any>{
// resource: {
// fsPath: '/my/dev/folder'
// }
// };
// const env2 = TerminalService.createTerminalEnv(parentEnv2, shell2, workspace2, 'en-au');
// assert.ok(!('PTYSHELLARG0' in env2), 'PTYSHELLARG0 is unset');
// assert.equal(env2['PTYCWD'], '/my/dev/folder', 'PTYCWD is equal to the workspace folder');
// assert.equal(env2['LANG'], 'en_AU.UTF-8', 'LANG is equal to the requested locale with UTF-8');
// const env3 = TerminalService.createTerminalEnv(parentEnv1, shell1, null, null);
// assert.ok(!('LANG' in env3), 'LANG is unset');
// const env4 = TerminalService.createTerminalEnv(parentEnv2, shell1, null, null);
// assert.equal(env4['LANG'], 'en_US.UTF-8', 'LANG is equal to the parent environment\'s LANG');
// }); |
<<<<<<<
get backupHome(): string { return path.join(this.userDataPath, 'Backups'); }
@memoize
get backupWorkspacesPath(): string { return path.join(this.backupHome, 'workspaces.json'); }
@memoize
get extensionsPath(): string { return path.normalize(this._args.extensionHomePath || path.join(this.userHome, 'extensions')); }
=======
get extensionsPath(): string { return path.normalize(this._args['extensions-dir'] || path.join(this.userHome, 'extensions')); }
>>>>>>>
get backupHome(): string { return path.join(this.userDataPath, 'Backups'); }
@memoize
get backupWorkspacesPath(): string { return path.join(this.backupHome, 'workspaces.json'); }
@memoize
get extensionsPath(): string { return path.normalize(this._args['extensions-dir'] || path.join(this.userHome, 'extensions')); } |
<<<<<<<
// make sure all dirty files are saved and make sure configuration is up to date
return this.textFileService.saveAll().then(() => this.configurationService.reloadConfiguration().then(() => this.extensionService.onReady().then(() => {
const compound = typeof configurationOrName === 'string' ? this.configurationManager.getCompound(configurationOrName) : null;
if (compound) {
if (!compound.launches) {
return TPromise.wrapError(new Error(nls.localize('compoundMustHaveConfigurationNames', "Compound must have \"configurationNames\" attribute set in order to start multiple configurations.")));
}
return TPromise.join(compound.launches.map(name => this.createProcess(name)));
}
return this.configurationManager.getConfiguration(configurationOrName).then(configuration => {
if (!configuration) {
return this.configurationManager.openConfigFile(false).then(openend => {
if (openend) {
this.messageService.show(severity.Info, nls.localize('NewLaunchConfig', "Please set up the launch configuration file for your application."));
}
});
}
if (!this.configurationManager.getAdapter(configuration.type)) {
return configuration.type ? TPromise.wrapError(new Error(nls.localize('debugTypeNotSupported', "Configured debug type '{0}' is not supported.", configuration.type)))
: TPromise.wrapError(errors.create(nls.localize('debugTypeMissing', "Missing property 'type' for the chosen launch configuration."),
{ actions: [this.instantiationService.createInstance(debugactions.ConfigureAction, debugactions.ConfigureAction.ID, debugactions.ConfigureAction.LABEL), CloseAction] }));
}
return this.runPreLaunchTask(configuration.preLaunchTask).then((taskSummary: ITaskSummary) => {
const errorCount = configuration.preLaunchTask ? this.markerService.getStatistics().errors : 0;
const successExitCode = taskSummary && taskSummary.exitCode === 0;
const failureExitCode = taskSummary && taskSummary.exitCode !== undefined && taskSummary.exitCode !== 0;
if (successExitCode || (errorCount === 0 && !failureExitCode)) {
return this.doCreateProcess(sessionId, configuration);
}
this.messageService.show(severity.Error, {
message: errorCount > 1 ? nls.localize('preLaunchTaskErrors', "Build errors have been detected during preLaunchTask '{0}'.", configuration.preLaunchTask) :
errorCount === 1 ? nls.localize('preLaunchTaskError', "Build error has been detected during preLaunchTask '{0}'.", configuration.preLaunchTask) :
nls.localize('preLaunchTaskExitCode', "The preLaunchTask '{0}' terminated with exit code {1}.", configuration.preLaunchTask, taskSummary.exitCode),
actions: [new Action('debug.continue', nls.localize('debugAnyway', "Debug Anyway"), null, true, () => {
this.messageService.hideAll();
return this.doCreateProcess(sessionId, configuration);
}), CloseAction]
});
}, (err: TaskError) => {
if (err.code !== TaskErrors.NotConfigured) {
throw err;
}
this.messageService.show(err.severity, {
message: err.message,
actions: [this.taskService.configureAction(), CloseAction]
});
});
});
})));
=======
return this.textFileService.saveAll() // make sure all dirty files are saved
.then(() => this.configurationService.reloadConfiguration() // make sure configuration is up to date
.then(() => this.extensionService.onReady()
.then(() => this.configurationManager.getConfiguration(configurationOrName)
.then(configuration => {
if (!configuration) {
return this.configurationManager.openConfigFile(false).then(openend => {
if (openend) {
this.messageService.show(severity.Info, nls.localize('NewLaunchConfig', "Please set up the launch configuration file for your application."));
}
});
}
if (!this.configurationManager.getAdapter(configuration.type)) {
return configuration.type ? TPromise.wrapError(new Error(nls.localize('debugTypeNotSupported', "Configured debug type '{0}' is not supported.", configuration.type)))
: TPromise.wrapError(errors.create(nls.localize('debugTypeMissing', "Missing property 'type' for the chosen launch configuration."),
{ actions: [this.instantiationService.createInstance(debugactions.ConfigureAction, debugactions.ConfigureAction.ID, debugactions.ConfigureAction.LABEL), CloseAction] }));
}
return this.runPreLaunchTask(configuration.preLaunchTask).then((taskSummary: ITaskSummary) => {
const errorCount = configuration.preLaunchTask ? this.markerService.getStatistics().errors : 0;
const successExitCode = taskSummary && taskSummary.exitCode === 0;
const failureExitCode = taskSummary && taskSummary.exitCode !== undefined && taskSummary.exitCode !== 0;
if (successExitCode || (errorCount === 0 && !failureExitCode)) {
return this.doCreateProcess(sessionId, configuration);
}
this.messageService.show(severity.Error, {
message: errorCount > 1 ? nls.localize('preLaunchTaskErrors', "Build errors have been detected during preLaunchTask '{0}'.", configuration.preLaunchTask) :
errorCount === 1 ? nls.localize('preLaunchTaskError', "Build error has been detected during preLaunchTask '{0}'.", configuration.preLaunchTask) :
nls.localize('preLaunchTaskExitCode', "The preLaunchTask '{0}' terminated with exit code {1}.", configuration.preLaunchTask, taskSummary.exitCode),
actions: [new Action('debug.continue', nls.localize('debugAnyway', "Debug Anyway"), null, true, () => {
this.messageService.hideAll();
return this.doCreateProcess(sessionId, configuration);
}), CloseAction]
});
}, (err: TaskError) => {
if (err.code !== TaskErrors.NotConfigured) {
throw err;
}
this.messageService.show(err.severity, {
message: err.message,
actions: [this.taskService.configureAction(), CloseAction]
});
});
}))));
>>>>>>>
return this.textFileService.saveAll() // make sure all dirty files are saved
.then(() => this.configurationService.reloadConfiguration() // make sure configuration is up to date
.then(() => this.extensionService.onReady()
.then(() => {
const compound = typeof configurationOrName === 'string' ? this.configurationManager.getCompound(configurationOrName) : null;
if (compound) {
if (!compound.launches) {
return TPromise.wrapError(new Error(nls.localize('compoundMustHaveConfigurationNames', "Compound must have \"configurationNames\" attribute set in order to start multiple configurations.")));
}
return TPromise.join(compound.launches.map(name => this.createProcess(name)));
}
return this.configurationManager.getConfiguration(configurationOrName).then(configuration => {
if (!configuration) {
return this.configurationManager.openConfigFile(false).then(openend => {
if (openend) {
this.messageService.show(severity.Info, nls.localize('NewLaunchConfig', "Please set up the launch configuration file for your application."));
}
});
}
if (!this.configurationManager.getAdapter(configuration.type)) {
return configuration.type ? TPromise.wrapError(new Error(nls.localize('debugTypeNotSupported', "Configured debug type '{0}' is not supported.", configuration.type)))
: TPromise.wrapError(errors.create(nls.localize('debugTypeMissing', "Missing property 'type' for the chosen launch configuration."),
{ actions: [this.instantiationService.createInstance(debugactions.ConfigureAction, debugactions.ConfigureAction.ID, debugactions.ConfigureAction.LABEL), CloseAction] }));
}
return this.runPreLaunchTask(configuration.preLaunchTask).then((taskSummary: ITaskSummary) => {
const errorCount = configuration.preLaunchTask ? this.markerService.getStatistics().errors : 0;
const successExitCode = taskSummary && taskSummary.exitCode === 0;
const failureExitCode = taskSummary && taskSummary.exitCode !== undefined && taskSummary.exitCode !== 0;
if (successExitCode || (errorCount === 0 && !failureExitCode)) {
return this.doCreateProcess(sessionId, configuration);
}
this.messageService.show(severity.Error, {
message: errorCount > 1 ? nls.localize('preLaunchTaskErrors', "Build errors have been detected during preLaunchTask '{0}'.", configuration.preLaunchTask) :
errorCount === 1 ? nls.localize('preLaunchTaskError', "Build error has been detected during preLaunchTask '{0}'.", configuration.preLaunchTask) :
nls.localize('preLaunchTaskExitCode', "The preLaunchTask '{0}' terminated with exit code {1}.", configuration.preLaunchTask, taskSummary.exitCode),
actions: [new Action('debug.continue', nls.localize('debugAnyway', "Debug Anyway"), null, true, () => {
this.messageService.hideAll();
return this.doCreateProcess(sessionId, configuration);
}), CloseAction]
});
}, (err: TaskError) => {
if (err.code !== TaskErrors.NotConfigured) {
throw err;
}
this.messageService.show(err.severity, {
message: err.message,
actions: [this.taskService.configureAction(), CloseAction]
});
});
});
}))); |
<<<<<<<
// Load configuration
const trinityConfig: TrinityConfig = new TrinityConfig();
=======
// Load configuration and event watcher
const trinityConfig = new TrinityConfig();
// Trigger event watcher
>>>>>>>
// Load configuration and event watcher
const trinityConfig: TrinityConfig = new TrinityConfig();
// Trigger event watcher |
<<<<<<<
if (resource.scheme === 'file') {
content = `${resource.fsPath}\n${content}`;
}
return this.fileService.updateContent(backupResource, content).then(() => void 0);
=======
return this.fileService.updateContent(backupResource, content, BACKUP_FILE_UPDATE_OPTIONS).then(() => void 0);
>>>>>>>
if (resource.scheme === 'file') {
content = `${resource.fsPath}\n${content}`;
}
return this.fileService.updateContent(backupResource, content, BACKUP_FILE_UPDATE_OPTIONS).then(() => void 0); |
<<<<<<<
import {EditorStacksModel, EditorGroup, IEditorIdentifier} from 'vs/workbench/common/editor/editorStacksModel';
=======
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
>>>>>>>
import {EditorStacksModel, EditorGroup, IEditorIdentifier} from 'vs/workbench/common/editor/editorStacksModel';
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
<<<<<<<
=======
private visibleInputListeners: IDisposable[];
>>>>>>>
<<<<<<<
private visibleEditorListeners: Function[][];
=======
private visibleEditorListeners: IDisposable[][];
>>>>>>>
private visibleEditorListeners: IDisposable[][];
<<<<<<<
return instantiateEditorPromise;
}
=======
// Register as Emitter to Workbench Bus
this.visibleEditorListeners[position].push(this.eventService.addEmitter2(this.visibleEditors[position], this.visibleEditors[position].getId()));
>>>>>>>
return instantiateEditorPromise;
}
<<<<<<<
return lastActiveEditor ? lastActiveEditor.input : null;
}
public getActiveEditor(): BaseEditor {
if (!this.sideBySideControl) {
return null; // too early
}
=======
// Clear Listeners
this.visibleEditorListeners[position] = dispose(this.visibleEditorListeners[position]);
>>>>>>>
return lastActiveEditor ? lastActiveEditor.input : null;
}
public getActiveEditor(): BaseEditor {
if (!this.sideBySideControl) {
return null; // too early
}
<<<<<<<
const focusListener = this.sideBySideControl.onGroupFocusChanged(() => this.onGroupFocusChanged());
this.toUnbind.push(() => focusListener.dispose());
const titleClickListener = this.sideBySideControl.onEditorTitleDoubleclick((position) => this.onEditorTitleDoubleclick(position));
this.toUnbind.push(() => titleClickListener.dispose());
=======
this.toUnbind.push(this.sideBySideControl.addListener2(SideBySideEventType.EDITOR_FOCUS_CHANGED, () => { this.onEditorFocusChanged(); }));
>>>>>>>
this.toUnbind.push(this.sideBySideControl.onGroupFocusChanged(() => this.onGroupFocusChanged()));
this.toUnbind.push(this.sideBySideControl.onEditorTitleDoubleclick((position) => this.onEditorTitleDoubleclick(position)));
<<<<<<<
=======
// Input listeners
for (let i = 0; i < this.visibleInputListeners.length; i++) {
let listener = this.visibleInputListeners[i];
if (listener) {
listener.dispose();
}
this.visibleInputListeners = [];
}
>>>>>>> |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.