conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
getNoticeData() {
const { notices = [] } = this.props;
if (notices.length === 0) {
return {};
}
const newNotices = notices.map(notice => {
const newNotice = { ...notice };
if (newNotice.datetime) {
newNotice.datetime = moment(notice.datetime).fromNow();
}
// transform id to item key
if (newNotice.id) {
newNotice.key = newNotice.id;
}
if (newNotice.extra && newNotice.status) {
const color = {
todo: '',
processing: 'blue',
urgent: 'red',
doing: 'gold',
}[newNotice.status];
newNotice.extra = (
<Tag color={color} style={{ marginRight: 0 }}>
{newNotice.extra}
</Tag>
);
}
return newNotice;
});
return groupBy(newNotices, 'type');
}
toggle = () => {
const { collapsed, onCollapse } = this.props;
onCollapse(!collapsed);
this.triggerResizeEvent();
};
/* eslint-disable*/
>>>>>>>
/* eslint-disable*/
<<<<<<<
triggerResizeEvent = () => {
// eslint-disable-line
=======
triggerResizeEvent() {
>>>>>>>
triggerResizeEvent() {
// eslint-disable-line
<<<<<<<
const { collapsed, isMobile, logo } = this.props;
=======
const {
currentUser,
collapsed,
fetchingNotices,
isMobile,
logo,
onNoticeVisibleChange,
onMenuClick,
onNoticeClear,
} = this.props;
const menu = (
<Menu className={styles.menu} selectedKeys={[]} onClick={onMenuClick}>
<Menu.Item disabled>
<Icon type="user" />个人中心
</Menu.Item>
<Menu.Item disabled>
<Icon type="setting" />设置
</Menu.Item>
<Menu.Item key="triggerError">
<Icon type="close-circle" />触发报错
</Menu.Item>
<Menu.Divider />
<Menu.Item key="logout">
<Icon type="logout" />退出登录
</Menu.Item>
</Menu>
);
const noticeData = this.getNoticeData();
>>>>>>>
const { collapsed, isMobile, logo } = this.props;
<<<<<<<
<RightContent {...this.props} />
=======
<div className={styles.right}>
<HeaderSearch
className={`${styles.action} ${styles.search}`}
placeholder="站内搜索"
dataSource={['搜索提示一', '搜索提示二', '搜索提示三']}
onSearch={value => {
console.log('input', value); // eslint-disable-line
}}
onPressEnter={value => {
console.log('enter', value); // eslint-disable-line
}}
/>
<Tooltip title="使用文档">
<a
target="_blank"
href="http://pro.ant.design/docs/getting-started"
rel="noopener noreferrer"
className={styles.action}
>
<Icon type="question-circle-o" />
</a>
</Tooltip>
<NoticeIcon
className={styles.action}
count={currentUser.notifyCount}
onItemClick={(item, tabProps) => {
console.log(item, tabProps); // eslint-disable-line
}}
onClear={onNoticeClear}
onPopupVisibleChange={onNoticeVisibleChange}
loading={fetchingNotices}
popupAlign={{ offset: [20, -16] }}
>
<NoticeIcon.Tab
list={noticeData['通知']}
title="通知"
emptyText="你已查看所有通知"
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg"
/>
<NoticeIcon.Tab
list={noticeData['消息']}
title="消息"
emptyText="您已读完所有消息"
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg"
/>
<NoticeIcon.Tab
list={noticeData['待办']}
title="待办"
emptyText="你已完成所有待办"
emptyImage="https://gw.alipayobjects.com/zos/rmsportal/HsIsxMZiWKrNUavQUXqx.svg"
/>
</NoticeIcon>
{currentUser.name ? (
<Dropdown overlay={menu}>
<span className={`${styles.action} ${styles.account}`}>
<Avatar size="small" className={styles.avatar} src={currentUser.avatar} />
<span className={styles.name}>{currentUser.name}</span>
</span>
</Dropdown>
) : (
<Spin size="small" style={{ marginLeft: 8 }} />
)}
</div>
>>>>>>>
<RightContent {...this.props} /> |
<<<<<<<
'RestAPIApplication/application.java.tmpl',
'rest/src/main/java/' + p.javaPackageDir + '/rest/' + p.name + 'RestApplication.java');
p.copyTemplate(p.ctx,
'RestAPIApplication/Launcher.java.tmpl',
'app/src/main/java/' + p.javaPackageDir + '/app/' + p.name + 'Launcher.java');
if (p.hasFeature('security')) {
p.copyTemplate(p.ctx,
'RestAPIApplication/DevelopmentKeyManagement.java.tmpl',
'app/src/main/java/' + p.javaPackageDir + '/app/DevelopmentKeyManagement.java');
p.copyTemplate(p.ctx,
'RestAPIApplication/web-shiro.ini.tmpl',
'app/src/main/resources/web-shiro.ini');
}
p.copyTemplate(p.ctx,
'RestAPIApplication/bootstrap.tmpl',
'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/' + p.name + 'ApplicationAssembler.java');
=======
'RestAPIApplication/web.xml.tmpl',
'app/src/main/webapp/WEB-INF/web.xml');
p.copyTemplate(p.ctx,
'RestAPIApplication/bootstrap-test.tmpl',
'app/src/test/java/'+p.javaPackageDir+'/BootstrapTest.java');
>>>>>>>
'RestAPIApplication/application.java.tmpl',
'rest/src/main/java/' + p.javaPackageDir + '/rest/' + p.name + 'RestApplication.java');
p.copyTemplate(p.ctx,
'RestAPIApplication/Launcher.java.tmpl',
'app/src/main/java/' + p.javaPackageDir + '/app/' + p.name + 'Launcher.java');
if (p.hasFeature('security')) {
p.copyTemplate(p.ctx,
'RestAPIApplication/DevelopmentKeyManagement.java.tmpl',
'app/src/main/java/' + p.javaPackageDir + '/app/DevelopmentKeyManagement.java');
p.copyTemplate(p.ctx,
'RestAPIApplication/web-shiro.ini.tmpl',
'app/src/main/resources/web-shiro.ini');
}
p.copyTemplate(p.ctx,
'RestAPIApplication/bootstrap-test.tmpl',
'app/src/test/java/'+p.javaPackageDir+'/BootstrapTest.java');
p.copyTemplate(p.ctx,
'RestAPIApplication/bootstrap.tmpl',
'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/' + p.name + 'ApplicationAssembler.java'); |
<<<<<<<
=======
// jest.runAllTimers();
// logs = [];
// render(<Counter ref={counter} />, container);
>>>>>>> |
<<<<<<<
import XSliderDemo from './XSliderDemo';
=======
import GyroscopeParallaxDemo from './GyroscopeParallaxDemo';
import GestureViewDemo from './GestureViewDemo';
>>>>>>>
import XSliderDemo from './XSliderDemo';
import GyroscopeParallaxDemo from './GyroscopeParallaxDemo';
import GestureViewDemo from './GestureViewDemo'; |
<<<<<<<
const PACKAGES_NAME = 'packages';
const PACKAGES_DIR = path.resolve(__dirname, `../${PACKAGES_NAME}`);
const PACKAGES2_NAME = 'components';
const PACKAGES2_DIR = path.resolve(__dirname, `../${PACKAGES2_NAME}`);
const babelOptions = JSON.parse(fs.readFileSync(
path.resolve(__dirname, '..', '.babelrc'),
'utf8'
));
=======
const PACKAGES_DIR = path.resolve(__dirname, '../packages');
const babelOptions = require('../babel.config')();
>>>>>>>
const PACKAGES_NAME = 'packages';
const PACKAGES_DIR = path.resolve(__dirname, `../${PACKAGES_NAME}`);
const PACKAGES2_NAME = 'components';
const PACKAGES2_DIR = path.resolve(__dirname, `../${PACKAGES2_NAME}`);
const babelOptions = require('../babel.config')(); |
<<<<<<<
import TabPanelDemo from './TabPanelDemo';
=======
import ParallaxDemo from './ParallaxDemo';
>>>>>>>
import TabPanelDemo from './TabPanelDemo';
import ParallaxDemo from './ParallaxDemo';
<<<<<<<
<View>
<Text style={styles.title}>TabPanel</Text>
<TabPanelDemo />
</View>
=======
<View>
<Text style={styles.title}>Parallax</Text>
<ParallaxDemo />
</View>
>>>>>>>
<View>
<Text style={styles.title}>Parallax</Text>
<ParallaxDemo />
</View>
<View>
<Text style={styles.title}>TabPanel</Text>
<TabPanelDemo />
</View> |
<<<<<<<
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { createNewVaultAndKeychain } from '../../../../ui/app/actions'
=======
import EventEmitter from 'events'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import classnames from 'classnames'
import {createNewVaultAndKeychain} from '../../../../ui/app/actions'
>>>>>>>
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { createNewVaultAndKeychain } from '../../../../ui/app/actions'
<<<<<<<
history: PropTypes.object.isRequired,
isInitialized: PropTypes.bool,
isUnlocked: PropTypes.bool,
=======
goToImportWithSeedPhrase: PropTypes.func.isRequired,
goToImportAccount: PropTypes.func.isRequired,
next: PropTypes.func.isRequired,
isMascara: PropTypes.bool.isRequired,
>>>>>>>
history: PropTypes.object.isRequired,
isInitialized: PropTypes.bool,
isUnlocked: PropTypes.bool,
isMascara: PropTypes.bool.isRequired,
<<<<<<<
componentWillMount () {
const { isInitialized, isUnlocked, history } = this.props
if (isInitialized || isUnlocked) {
history.push(DEFAULT_ROUTE)
}
}
isValid () {
const { password, confirmPassword } = this.state
=======
isValid () {
const {password, confirmPassword} = this.state
>>>>>>>
componentWillMount () {
const { isInitialized, isUnlocked, history } = this.props
if (isInitialized || isUnlocked) {
history.push(DEFAULT_ROUTE)
}
}
isValid () {
const { password, confirmPassword } = this.state
<<<<<<<
const { password } = this.state
const { createAccount, history } = this.props
=======
const {password} = this.state
const {createAccount, next} = this.props
>>>>>>>
const { password } = this.state
const { createAccount, history } = this.props
<<<<<<<
mapStateToProps,
=======
({ appState: { isLoading }, metamask: { isMascara } }) => ({ isLoading, isMascara }),
>>>>>>>
mapStateToProps, |
<<<<<<<
=======
const { join, parse, resolve, dirname, extname } = require('path');
const vueCompiler = require('vue-template-compiler');
>>>>>>>
const { join, parse, resolve, dirname, extname } = require('path'); |
<<<<<<<
import { useRouter, push, go, goBack, goForward, canGo, replace, preload, prerender } from './router';
=======
import { useRouter, Link, push, go, goBack, goForward, canGo, replace } from './router';
>>>>>>>
import { useRouter, Link, push, go, goBack, goForward, canGo, replace, preload, prerender } from './router';
<<<<<<<
useRouter, push, go, goBack, goForward, canGo, replace, preload, prerender
=======
useRouter, push, go, goBack, goForward, canGo, replace, Link,
>>>>>>>
useRouter, push, go, goBack, goForward, canGo, replace, Link, preload, prerender |
<<<<<<<
// STATUS METHODS
// statuses:
// - `'unapproved'` the user has not responded
// - `'rejected'` the user has responded no!
// - `'approved'` the user has approved the tx
// - `'signed'` the tx is signed
// - `'submitted'` the tx is sent to a server
// - `'confirmed'` the tx has been included in a block.
// - `'failed'` the tx failed for some reason, included on tx data.
// - `'dropped'` the tx nonce was already used
module.exports = class TransactionStateManger extends EventEmitter {
=======
module.exports = class TransactionStateManager extends EventEmitter {
>>>>>>>
// STATUS METHODS
// statuses:
// - `'unapproved'` the user has not responded
// - `'rejected'` the user has responded no!
// - `'approved'` the user has approved the tx
// - `'signed'` the tx is signed
// - `'submitted'` the tx is sent to a server
// - `'confirmed'` the tx has been included in a block.
// - `'failed'` the tx failed for some reason, included on tx data.
// - `'dropped'` the tx nonce was already used
module.exports = class TransactionStateManager extends EventEmitter { |
<<<<<<<
=======
const pathConfig = require('../../path.config');
>>>>>>>
const pathConfig = require('../../path.config'); |
<<<<<<<
import { DEFAULT_ROUTE } from '../../../../ui/app/routes'
=======
import LoadingScreen from './loading-screen'
>>>>>>>
import { DEFAULT_ROUTE } from '../../../../ui/app/routes'
import LoadingScreen from './loading-screen'
<<<<<<<
location: PropTypes.shape({
state: PropTypes.shape({
next: PropTypes.func.isRequired,
}),
}),
markNoticeRead: PropTypes.func,
history: PropTypes.object,
=======
next: PropTypes.func.isRequired,
markNoticeRead: PropTypes.func,
>>>>>>>
location: PropTypes.shape({
state: PropTypes.shape({
next: PropTypes.func.isRequired,
}),
}),
markNoticeRead: PropTypes.func,
history: PropTypes.object,
isLoading: PropTypes.bool,
<<<<<<<
const { markNoticeRead, lastUnreadNotice, history } = this.props
markNoticeRead(lastUnreadNotice)
.then(() => {
history.push(DEFAULT_ROUTE)
this.setState({ atBottom: false })
})
=======
const { markNoticeRead, lastUnreadNotice, next } = this.props
const defer = markNoticeRead(lastUnreadNotice)
.then(() => this.setState({ atBottom: false }))
if ((/terms/gi).test(lastUnreadNotice.title)) {
defer.then(next)
}
>>>>>>>
const { markNoticeRead, lastUnreadNotice, history } = this.props
markNoticeRead(lastUnreadNotice)
.then(() => {
history.push(DEFAULT_ROUTE)
this.setState({ atBottom: false })
})
<<<<<<<
lastUnreadNotice: { title, body },
} = this.props
=======
lastUnreadNotice: { title, body },
isLoading,
} = this.props
>>>>>>>
lastUnreadNotice: { title, body },
isLoading,
} = this.props
<<<<<<<
<div className="first-time-flow">
<div
className="tou"
onScroll={this.onScroll}
>
<Identicon address={address} diameter={70} />
<div className="tou__title">{title}</div>
<Markdown
className="tou__body markdown"
source={body}
skipHtml
/>
<button
className="first-time-flow__button"
onClick={atBottom && this.acceptTerms}
disabled={!atBottom}
>
Accept
</button>
<Breadcrumbs total={3} currentIndex={2} />
</div>
</div>
=======
isLoading
? <LoadingScreen />
: (
<div className="first-view-main-wrapper">
<div className="first-view-main">
<div
className="tou"
onScroll={this.onScroll}
>
<Identicon address={address} diameter={70} />
<div className="tou__title">{title}</div>
<Markdown
className="tou__body markdown"
source={body}
skipHtml
/>
<button
className="first-time-flow__button"
onClick={atBottom && this.acceptTerms}
disabled={!atBottom}
>
Accept
</button>
<Breadcrumbs total={3} currentIndex={2} />
</div>
</div>
</div>
)
>>>>>>>
isLoading
? <LoadingScreen />
: (
<div className="first-view-main-wrapper">
<div className="first-view-main">
<div
className="tou"
onScroll={this.onScroll}
>
<Identicon address={address} diameter={70} />
<div className="tou__title">{title}</div>
<Markdown
className="tou__body markdown"
source={body}
skipHtml
/>
<button
className="first-time-flow__button"
onClick={atBottom && this.acceptTerms}
disabled={!atBottom}
>
Accept
</button>
<Breadcrumbs total={3} currentIndex={2} />
</div>
</div>
</div>
) |
<<<<<<<
if (this._gsCurrentVersion[1] < 8) {
=======
if (_DEBUG_) global.log("dockedWorkspaces: _changeStylesheet - Removed previous stylesheet");
newTheme.load_stylesheet(Extension.workspacesToDockStylesheet);
if (_DEBUG_) global.log("dockedWorkspaces: _changeStylesheet - Added new stylesheet");
themeContext.set_theme (newTheme);
if (this._gsCurrentVersion[1] < 7) {
>>>>>>>
if (_DEBUG_) global.log("dockedWorkspaces: _changeStylesheet - Removed previous stylesheet");
newTheme.load_stylesheet(Extension.workspacesToDockStylesheet);
if (_DEBUG_) global.log("dockedWorkspaces: _changeStylesheet - Added new stylesheet");
themeContext.set_theme (newTheme);
if (this._gsCurrentVersion[1] < 8) { |
<<<<<<<
const { EventEmitter } = require('events')
const { Component } = require('react')
const connect = require('../metamask-connect')
=======
const inherits = require('util').inherits
const EventEmitter = require('events').EventEmitter
const Component = require('react').Component
const PropTypes = require('prop-types')
const connect = require('react-redux').connect
>>>>>>>
const { EventEmitter } = require('events')
const { Component } = require('react')
const PropTypes = require('prop-types')
const connect = require('react-redux').connect
<<<<<<<
this.animationEventEmitter = new EventEmitter()
this.state = {
warning: null,
}
=======
InitializeMenuScreen.contextTypes = {
t: PropTypes.func,
}
module.exports = connect(mapStateToProps)(InitializeMenuScreen)
inherits(InitializeMenuScreen, Component)
function InitializeMenuScreen () {
Component.call(this)
this.animationEventEmitter = new EventEmitter()
}
function mapStateToProps (state) {
return {
// state from plugin
currentView: state.appState.currentView,
warning: state.appState.warning,
>>>>>>>
this.animationEventEmitter = new EventEmitter()
this.state = {
warning: null,
}
<<<<<<<
return (
h('.initialize-screen.flex-column.flex-center', [
=======
h('h1', {
style: {
fontSize: '1.3em',
textTransform: 'uppercase',
color: '#7F8082',
marginBottom: 10,
},
}, this.context.t('appName')),
>>>>>>>
return (
h('.initialize-screen.flex-column.flex-center', [
<<<<<<<
h('span.error.in-progress-notification', warning),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
placeholder: this.props.t('newPassword'),
onInput: this.inputChanged.bind(this),
=======
]),
h('span.in-progress-notification', state.warning),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
placeholder: this.context.t('newPassword'),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 12,
},
}),
// confirm password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
placeholder: this.context.t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 16,
},
}),
h('button.primary', {
onClick: this.createNewVaultAndKeychain.bind(this),
style: {
margin: 12,
},
}, this.context.t('createDen')),
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
onClick: this.showRestoreVault.bind(this),
>>>>>>>
h('span.error.in-progress-notification', warning),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
placeholder: this.context.t('newPassword'),
onInput: this.inputChanged.bind(this),
<<<<<<<
}),
// confirm password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
placeholder: this.props.t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 16,
},
}),
=======
}, this.context.t('importDen')),
]),
>>>>>>>
}),
// confirm password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
placeholder: this.context.t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 16,
},
}),
<<<<<<<
return {
isInitialized,
isUnlocked,
=======
if (password.length < 8) {
this.warning = this.context.t('passwordShort')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
if (password !== passwordConfirm) {
this.warning = this.context.t('passwordMismatch')
this.props.dispatch(actions.displayWarning(this.warning))
return
>>>>>>>
return {
isInitialized,
isUnlocked, |
<<<<<<<
import {
isCompositeComponent,
isLazyType,
isMemoType,
} from './internal/reactUtils'
=======
import {
getComponentDisplayName,
isCompositeComponent,
} from './internal/reactUtils'
>>>>>>>
import React from 'react'
import {
isCompositeComponent,
getComponentDisplayName,
isLazyType,
isMemoType,
isForwardType,
} from './internal/reactUtils'
<<<<<<<
const forceSimpleSFC = { proxy: { allowSFC: false } }
const lazyConstructor = '_ctor'
function resolveType(type, options = {}) {
if (isLazyType({ type })) {
const proxy = getProxyByType(type)
if (proxy) {
proxy.check(type[lazyConstructor])
return proxy.get()
}
}
if (isMemoType({ type })) {
return {
...type,
type: resolveType(type.type, forceSimpleSFC),
}
}
if (
!isCompositeComponent(type) ||
isTypeBlacklisted(type) ||
isProxyType(type)
)
return type
=======
const shouldNotPatchComponent = type =>
!isCompositeComponent(type) || isTypeBlacklisted(type) || isProxyType(type)
function resolveType(type) {
if (shouldNotPatchComponent(type)) return type
const existingProxy = getProxyByType(type)
if (!existingProxy && configuration.onComponentCreate) {
configuration.onComponentCreate(type, getComponentDisplayName(type))
if (shouldNotPatchComponent(type)) return type
}
>>>>>>>
const forceSimpleSFC = { proxy: { allowSFC: false } }
const lazyConstructor = '_ctor'
const updateLazy = (target, type) => {
const ctor = type[lazyConstructor]
if (target[lazyConstructor] !== type[lazyConstructor]) {
ctor()
}
target[lazyConstructor] = () =>
ctor().then(m => {
const C = resolveType(m.default)
return {
default: props => <C {...props} />,
}
})
}
const updateMemo = (target, { type }) => {
target.type = resolveType(type)
}
const updateForward = (target, { render }) => {
target.render = render
}
const shouldNotPatchComponent = type =>
!isCompositeComponent(type) || isTypeBlacklisted(type) || isProxyType(type)
function resolveType(type, options = {}) {
if (isLazyType({ type }) || isMemoType({ type }) || isForwardType({ type })) {
return getProxyByType(type) || type
}
if (shouldNotPatchComponent(type)) return type
const existingProxy = getProxyByType(type)
if (!existingProxy && configuration.onComponentCreate) {
configuration.onComponentCreate(type, getComponentDisplayName(type))
if (shouldNotPatchComponent(type)) return type
}
<<<<<<<
? getProxyByType(type)
: createProxyForType(type, options)
=======
? existingProxy
: createProxyForType(type)
>>>>>>>
? existingProxy
: createProxyForType(type, options) |
<<<<<<<
e.preventDefault(); // prevent click 300ms later
=======
//e.preventDefault();//prevent click 300ms later. Danger
>>>>>>>
// e.preventDefault(); // prevent click 300ms later. Danger |
<<<<<<<
const tmpDirPath = path.join(os.tmpdir(), (new Date()).getTime().toString());
=======
const tmpDirPath = testUtils.getTmpDirPath();
const handlerPath = path.join(tmpDirPath, 'handler.js');
serverless.utils.writeFileSync(handlerPath, 'handler.js file content');
const nestedFunctionPath = path.join(tmpDirPath, 'lib', 'function.js');
serverless.utils.writeFileSync(nestedFunctionPath, 'function.js content');
// create the files and folders which should be excluded
const excludeMeDirectoryPath = path.join(tmpDirPath, 'exclude-me', 'some-file');
serverless.utils.writeFileSync(excludeMeDirectoryPath, 'some-file content');
const excludeMeFilePath = path.join(tmpDirPath, 'exclude-me.js');
serverless.utils.writeFileSync(excludeMeFilePath, 'exclude-me.js file content');
// create the files and folders which should be included
const includeMeDirectoryPath = path.join(tmpDirPath, 'include-me', 'some-file');
serverless.utils.writeFileSync(includeMeDirectoryPath, 'some-file content');
const includeMeFilePath = path.join(tmpDirPath, 'include-me.js');
serverless.utils.writeFileSync(includeMeFilePath, 'include-me.js file content');
// create a executable file
const executableFilePath = path.join(tmpDirPath, 'bin/some-binary');
serverless.utils.writeFileSync(executableFilePath, 'some-binary executable file content');
fs.chmodSync(executableFilePath, 777);
// create a readonly file
const readOnlyFilePath = path.join(tmpDirPath, 'bin/read-only');
serverless.utils.writeFileSync(readOnlyFilePath, 'read-only executable file content');
fs.chmodSync(readOnlyFilePath, 444);
// a serverless plugin that should be included
const includeMe2FilePath = path.join(tmpDirPath, 'a-serverless-plugin.js');
serverless.utils.writeFileSync(includeMe2FilePath, 'a-serverless-plugin.js file content');
// create the files and folder which should be ignored by default
// .gitignore
const gitignoreFilePath = path.join(tmpDirPath, '.gitignore');
serverless.utils.writeFileSync(gitignoreFilePath, 'content');
// .DS_Store
const dsStoreFilePath = path.join(tmpDirPath, '.DS_Store');
serverless.utils.writeFileSync(dsStoreFilePath, 'content');
// serverless.yml
const serverlessYmlFilePath = path.join(tmpDirPath, 'serverless.yml');
serverless.utils.writeFileSync(serverlessYmlFilePath, 'serverless.yml file content');
// serverless.env.yml
const serverlessEnvYmlFilePath = path.join(tmpDirPath, 'serverless.env.yml');
serverless.utils.writeFileSync(serverlessEnvYmlFilePath, 'serverless.env.yml file content');
// .git
const gitFilePath = path.join(path.join(tmpDirPath, '.git'), 'some-git-file');
serverless.utils.writeFileSync(gitFilePath, 'some-git-file content');
>>>>>>>
const tmpDirPath = testUtils.getTmpDirPath();
<<<<<<<
return zip.loadAsync(data);
}).then(unzippedData => {
const unzippedFileData = unzippedData.files;
=======
it('should resolve if the user has specified his own artifact', (done) => {
// create an artifact in a temp directory
const tmpDirPath = testUtils.getTmpDirPath();
const handlerPath = path.join(tmpDirPath, 'handler.js');
serverless.utils.writeFileSync(handlerPath, 'handler.js file content');
packageService.serverless.utils.walkDirSync(tmpDirPath).forEach((filePath) => {
const relativeFilePath = path.relative(tmpDirPath, filePath);
zip.file(relativeFilePath, fs.readFileSync(filePath));
});
zip.generateAsync({ type: 'nodebuffer', compression: 'DEFLATE' }).then(data => {
const artifactFilePath = path.join(tmpDirPath, 'artifact.zip');
fs.writeFileSync(artifactFilePath, data, 'binary');
>>>>>>>
return zip.loadAsync(data);
}).then(unzippedData => {
const unzippedFileData = unzippedData.files; |
<<<<<<<
const { ADD_TOKEN_ROUTE } = require('../routes')
=======
const t = require('../../i18n')
>>>>>>>
const { ADD_TOKEN_ROUTE } = require('../routes')
const t = require('../../i18n')
<<<<<<<
h('button.btn-clear.wallet-view__add-token-button', {
onClick: () => history.push(ADD_TOKEN_ROUTE),
}, 'Add Token'),
=======
h('button.btn-primary.wallet-view__add-token-button', {
onClick: () => {
showAddTokenPage()
hideSidebar()
},
}, t('addToken')),
>>>>>>>
h('button.btn-primary.wallet-view__add-token-button', {
onClick: () => history.push(ADD_TOKEN_ROUTE),
}, t('addToken')), |
<<<<<<<
const { replaceTextInFile } = require('../fs');
const { execSync } = require('../child-process');
=======
const { readYamlFile, writeYamlFile } = require('../fs');
>>>>>>>
const { execSync } = require('../child-process');
const { readYamlFile, writeYamlFile } = require('../fs'); |
<<<<<<<
describe('Service Lifecyle Integration Test', function () {
this.timeout(0);
it('should create service in tmp directory', () => {
execSync(`${serverlessExec} create --template ${templateName}`, { stdio: 'inherit' });
testUtils.replaceTextInFile('serverless.yml', templateName, newServiceName);
testUtils.replaceTextInFile('serverless.yml', 'name: aws', 'name: aws\n cfLogs: true');
expect(serverless.utils
.fileExistsSync(path.join(tmpDir, 'serverless.yml'))).to.be.equal(true);
expect(serverless.utils
.fileExistsSync(path.join(tmpDir, 'handler.js'))).to.be.equal(true);
});
it('should deploy service to aws', () => {
execSync(`${serverlessExec} deploy`, { stdio: 'inherit' });
return CF.describeStacksPromised({ StackName: stackName })
.then(d => expect(d.Stacks[0].StackStatus).to.be.equal('UPDATE_COMPLETE'));
});
it('should invoke function from aws', () => {
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
// parse it once again because the body is stringified to be LAMBDA-PROXY ready
const message = JSON.parse(result.body).message;
expect(message).to.be.equal('Go Serverless v1.0! Your function executed successfully!');
});
it('should deploy updated service to aws', () => {
const newHandler =
`
'use strict';
module.exports.hello = (event, context, cb) => cb(null,
{ message: 'Service Update Succeeded' }
);
`;
serverless.utils.writeFileSync(path.join(tmpDir, 'handler.js'), newHandler);
execSync(`${serverlessExec} deploy`, { stdio: 'inherit' });
});
it('should invoke updated function from aws', () => {
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
expect(result.message).to.be.equal('Service Update Succeeded');
});
it('should list existing deployments and roll back to first deployment', () => {
let timestamp;
const listDeploys = execSync(`${serverlessExec} deploy list`);
const output = listDeploys.toString();
const match = output.match(new RegExp('Timestamp: (.+)'));
if (match) {
timestamp = match[1];
}
// eslint-disable-next-line no-unused-expressions
expect(timestamp).to.not.undefined;
execSync(`${serverlessExec} rollback -t ${timestamp}`);
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
// parse it once again because the body is stringified to be LAMBDA-PROXY ready
const message = JSON.parse(result.body).message;
expect(message).to.be.equal('Go Serverless v1.0! Your function executed successfully!');
});
it('should remove service from aws', () => {
execSync(`${serverlessExec} remove`, { stdio: 'inherit' });
return CF.describeStacksPromised({ StackName: stackName })
.then(d => expect(d.Stacks[0].StackStatus).to.be.equal('DELETE_COMPLETE'))
.catch(e => {
if (e.message.indexOf('does not exist') > -1) return BbPromise.resolve();
throw new serverless.classes.Error(e);
});
});
=======
test.serial('should create service in tmp directory', () => {
execSync(`${serverlessExec} create --template ${templateName}`, { stdio: 'inherit' });
execSync(`sed -i.bak s/${templateName}/${newServiceName}/g serverless.yml`);
execSync("sed -i.bak '/provider:/a \\ cfLogs: true' serverless.yml");
expect(serverless.utils
.fileExistsSync(path.join(tmpDir, 'serverless.yml'))).to.be.equal(true);
expect(serverless.utils
.fileExistsSync(path.join(tmpDir, 'handler.js'))).to.be.equal(true);
});
test.serial('should deploy service to aws', () => {
execSync(`${serverlessExec} deploy`, { stdio: 'inherit' });
return CF.describeStacksPromised({ StackName: stackName })
.then(d => expect(d.Stacks[0].StackStatus).to.be.equal('UPDATE_COMPLETE'));
});
test.serial('should invoke function from aws', () => {
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
// parse it once again because the body is stringified to be LAMBDA-PROXY ready
const message = JSON.parse(result.body).message;
expect(message).to.be.equal('Go Serverless v1.0! Your function executed successfully!');
});
test.serial('should deploy updated service to aws', () => {
const newHandler =
`
'use strict';
module.exports.hello = (event, context, cb) => cb(null,
{ message: 'Service Update Succeeded' }
);
`;
serverless.utils.writeFileSync(path.join(tmpDir, 'handler.js'), newHandler);
execSync(`${serverlessExec} deploy`, { stdio: 'inherit' });
});
test.serial('should invoke updated function from aws', () => {
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
expect(result.message).to.be.equal('Service Update Succeeded');
});
test.serial('should list existing deployments and roll back to first deployment', () => {
let timestamp;
const listDeploys = execSync(`${serverlessExec} deploy list`);
const output = listDeploys.toString();
const match = output.match(new RegExp('Timestamp: (.+)'));
if (match) {
timestamp = match[1];
}
// eslint-disable-next-line no-unused-expressions
expect(timestamp).to.not.undefined;
execSync(`${serverlessExec} rollback -t ${timestamp}`);
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
// parse it once again because the body is stringified to be LAMBDA-PROXY ready
const message = JSON.parse(result.body).message;
expect(message).to.be.equal('Go Serverless v1.0! Your function executed successfully!');
});
test.serial('should remove service from aws', () => {
execSync(`${serverlessExec} remove`, { stdio: 'inherit' });
return CF.describeStacksPromised({ StackName: stackName })
.then(d => expect(d.Stacks[0].StackStatus).to.be.equal('DELETE_COMPLETE'))
.catch(e => {
if (e.message.indexOf('does not exist') > -1) return BbPromise.resolve();
throw new serverless.classes.Error(e);
});
>>>>>>>
test.serial('should create service in tmp directory', () => {
execSync(`${serverlessExec} create --template ${templateName}`, { stdio: 'inherit' });
testUtils.replaceTextInFile('serverless.yml', templateName, newServiceName);
testUtils.replaceTextInFile('serverless.yml', 'name: aws', 'name: aws\n cfLogs: true');
expect(serverless.utils
.fileExistsSync(path.join(tmpDir, 'serverless.yml'))).to.be.equal(true);
expect(serverless.utils
.fileExistsSync(path.join(tmpDir, 'handler.js'))).to.be.equal(true);
});
test.serial('should deploy service to aws', () => {
execSync(`${serverlessExec} deploy`, { stdio: 'inherit' });
return CF.describeStacksPromised({ StackName: stackName })
.then(d => expect(d.Stacks[0].StackStatus).to.be.equal('UPDATE_COMPLETE'));
});
test.serial('should invoke function from aws', () => {
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
// parse it once again because the body is stringified to be LAMBDA-PROXY ready
const message = JSON.parse(result.body).message;
expect(message).to.be.equal('Go Serverless v1.0! Your function executed successfully!');
});
test.serial('should deploy updated service to aws', () => {
const newHandler =
`
'use strict';
module.exports.hello = (event, context, cb) => cb(null,
{ message: 'Service Update Succeeded' }
);
`;
serverless.utils.writeFileSync(path.join(tmpDir, 'handler.js'), newHandler);
execSync(`${serverlessExec} deploy`, { stdio: 'inherit' });
});
test.serial('should invoke updated function from aws', () => {
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
expect(result.message).to.be.equal('Service Update Succeeded');
});
test.serial('should list existing deployments and roll back to first deployment', () => {
let timestamp;
const listDeploys = execSync(`${serverlessExec} deploy list`);
const output = listDeploys.toString();
const match = output.match(new RegExp('Timestamp: (.+)'));
if (match) {
timestamp = match[1];
}
// eslint-disable-next-line no-unused-expressions
expect(timestamp).to.not.undefined;
execSync(`${serverlessExec} rollback -t ${timestamp}`);
const invoked = execSync(`${serverlessExec} invoke --function hello --noGreeting true`);
const result = JSON.parse(new Buffer(invoked, 'base64').toString());
// parse it once again because the body is stringified to be LAMBDA-PROXY ready
const message = JSON.parse(result.body).message;
expect(message).to.be.equal('Go Serverless v1.0! Your function executed successfully!');
});
test.serial('should remove service from aws', () => {
execSync(`${serverlessExec} remove`, { stdio: 'inherit' });
return CF.describeStacksPromised({ StackName: stackName })
.then(d => expect(d.Stacks[0].StackStatus).to.be.equal('DELETE_COMPLETE'))
.catch(e => {
if (e.message.indexOf('does not exist') > -1) return BbPromise.resolve();
throw new serverless.classes.Error(e);
}); |
<<<<<<<
module.exports = compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(TxView)
=======
TxView.contextTypes = {
t: PropTypes.func,
}
module.exports = connect(mapStateToProps, mapDispatchToProps)(TxView)
>>>>>>>
module.exports = compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(TxView)
TxView.contextTypes = {
t: PropTypes.func,
}
<<<<<<<
onClick: () => history.push(SEND_ROUTE),
}, this.props.t('send')),
=======
onClick: showSendPage,
}, this.context.t('send')),
>>>>>>>
onClick: () => history.push(SEND_ROUTE),
}, this.context.t('send')),
<<<<<<<
onClick: () => history.push(SEND_ROUTE),
}, this.props.t('send')),
=======
onClick: showSendTokenPage,
}, this.context.t('send')),
>>>>>>>
onClick: () => history.push(SEND_ROUTE),
}, this.context.t('send')), |
<<<<<<<
getHooks(events) {
return _.flatMap([].concat(events), (event) => this.hooks[event] || []);
}
run(commandsArray) {
const command = this.getCommand(commandsArray);
=======
invoke(commandsArray, allowEntryPoints) {
const command = this.getCommand(commandsArray, allowEntryPoints);
>>>>>>>
getHooks(events) {
return _.flatMap([].concat(events), (event) => this.hooks[event] || []);
}
invoke(commandsArray, allowEntryPoints) {
const command = this.getCommand(commandsArray, allowEntryPoints); |
<<<<<<<
invokeLocalNodeJsStub.restore();
invokeLocalPythonStub.restore();
invokeLocalJavaStub.restore();
=======
awsInvokeLocal.invokeLocalNodeJs.restore();
awsInvokeLocal.invokeLocalPython.restore();
>>>>>>>
awsInvokeLocal.invokeLocalNodeJsStub.restore();
awsInvokeLocal.invokeLocalPythonStub.restore();
awsInvokeLocal.invokeLocalJavaStub.restore();
<<<<<<<
awsInvokeLocal.invokeLocal()
.then(() => {
expect(invokeLocalPythonStub.calledOnce).to.be.equal(true);
expect(invokeLocalPythonStub.calledWithExactly(
'python2.7',
'handler',
'hello',
{}
)).to.be.equal(true);
awsInvokeLocal.invokeLocalPython.restore();
});
});
it('should call invokeLocalJava when java8 runtime is set', () => {
awsInvokeLocal.options.functionObj.runtime = 'java8';
awsInvokeLocal.invokeLocal()
.then(() => {
expect(invokeLocalJavaStub.calledOnce).to.be.equal(true);
expect(invokeLocalJavaStub.calledWithExactly(
'java8',
'handler',
'hello',
{}
)).to.be.equal(true);
awsInvokeLocal.invokeLocalJava.restore();
});
delete awsInvokeLocal.options.functionObj.runtime;
=======
return awsInvokeLocal.invokeLocal().then(() => {
// NOTE: this is important so that tests on Windows won't fail
const runtime = process.platform === 'win32' ? 'python.exe' : 'python2.7';
expect(invokeLocalPythonStub.calledOnce).to.be.equal(true);
expect(invokeLocalPythonStub.calledWithExactly(
runtime,
'handler',
'hello',
{},
undefined
)).to.be.equal(true);
delete awsInvokeLocal.options.functionObj.runtime;
});
>>>>>>>
return awsInvokeLocal.invokeLocal().then(() => {
// NOTE: this is important so that tests on Windows won't fail
const runtime = process.platform === 'win32' ? 'python.exe' : 'python2.7';
expect(invokeLocalPythonStub.calledOnce).to.be.equal(true);
expect(invokeLocalPythonStub.calledWithExactly(
runtime,
'handler',
'hello',
{},
undefined
)).to.be.equal(true);
delete awsInvokeLocal.options.functionObj.runtime;
});
});
it('should call invokeLocalJava when java8 runtime is set', () => {
awsInvokeLocal.options.functionObj.runtime = 'java8';
awsInvokeLocal.invokeLocal()
.then(() => {
expect(invokeLocalJavaStub.calledOnce).to.be.equal(true);
expect(invokeLocalJavaStub.calledWithExactly(
'java8',
'handler',
'hello',
{}
)).to.be.equal(true);
awsInvokeLocal.invokeLocalJava.restore();
});
delete awsInvokeLocal.options.functionObj.runtime; |
<<<<<<<
let context = {
=======
const timeout = Number(this.options.functionObj.timeout)
|| Number(this.serverless.service.provider.timeout)
|| 6;
const context = {
>>>>>>>
const timeout = Number(this.options.functionObj.timeout)
|| Number(this.serverless.service.provider.timeout)
|| 6;
let context = { |
<<<<<<<
describe('AWS - CloudWathEvent: Multiple events with multiple functions', () => {
=======
const CF = new AWS.CloudFormation({ region: 'us-east-1' });
BbPromise.promisifyAll(CF, { suffix: 'Promised' });
describe('AWS - CloudWatch Event: Multiple events with multiple functions', () => {
let stackName;
let instanceId;
>>>>>>>
describe('AWS - CloudWatch Event: Multiple events with multiple functions', () => { |
<<<<<<<
ConfigManager.prototype.setCurrentFiat = function (currency) {
var data = this.getData()
data.fiatCurrency = currency
this.setData(data)
}
ConfigManager.prototype.getCurrentFiat = function () {
var data = this.getData()
return ('fiatCurrency' in data) && data.fiatCurrency
}
ConfigManager.prototype.updateConversionRate = function () {
var data = this.getData()
return rp(`https://www.cryptonator.com/api/ticker/eth-${data.fiatCurrency}`)
.then((response) => {
const parsedResponse = JSON.parse(response)
this.setConversionPrice(parsedResponse.ticker.price)
this.setConversionDate(parsedResponse.timestamp)
}).catch((err) => {
console.error('Error in conversion.', err)
})
}
ConfigManager.prototype.setConversionPrice = function(price) {
var data = this.getData()
data.conversionRate = Number(price)
this.setData(data)
}
ConfigManager.prototype.setConversionDate = function (datestring) {
var data = this.getData()
data.conversionDate = datestring
this.setData(data)
}
ConfigManager.prototype.getConversionRate = function () {
var data = this.getData()
return ('conversionRate' in data) && data.conversionRate
}
ConfigManager.prototype.getConversionDate = function () {
var data = this.getData()
return ('conversionDate' in data) && data.conversionDate
}
ConfigManager.prototype.setShouldntShowWarning = function (confirmed) {
=======
ConfigManager.prototype.setShouldntShowWarning = function () {
>>>>>>>
ConfigManager.prototype.setCurrentFiat = function (currency) {
var data = this.getData()
data.fiatCurrency = currency
this.setData(data)
}
ConfigManager.prototype.getCurrentFiat = function () {
var data = this.getData()
return ('fiatCurrency' in data) && data.fiatCurrency
}
ConfigManager.prototype.updateConversionRate = function () {
var data = this.getData()
return rp(`https://www.cryptonator.com/api/ticker/eth-${data.fiatCurrency}`)
.then((response) => {
const parsedResponse = JSON.parse(response)
this.setConversionPrice(parsedResponse.ticker.price)
this.setConversionDate(parsedResponse.timestamp)
}).catch((err) => {
console.error('Error in conversion.', err)
})
}
ConfigManager.prototype.setConversionPrice = function(price) {
var data = this.getData()
data.conversionRate = Number(price)
this.setData(data)
}
ConfigManager.prototype.setConversionDate = function (datestring) {
var data = this.getData()
data.conversionDate = datestring
this.setData(data)
}
ConfigManager.prototype.getConversionRate = function () {
var data = this.getData()
return ('conversionRate' in data) && data.conversionRate
}
ConfigManager.prototype.getConversionDate = function () {
var data = this.getData()
return ('conversionDate' in data) && data.conversionDate
}
ConfigManager.prototype.setShouldntShowWarning = function () { |
<<<<<<<
return childProcess.execAsync(
`npm ls --dev=true --parseable=true --long=false --silent >> ${nodeDevDepFile}`,
{ cwd: dirWithPackageJson }
).catch(() => BbPromise.resolve());
=======
return BbPromise.map(['dev', 'prod'], (env) => {
const depFile = env === 'dev' ? nodeDevDepFile : nodeProdDepFile;
return childProcess.execAsync(
`npm ls --${env}=true --parseable=true --silent >> ${depFile}`,
{ cwd: dirWithPackageJson }
).catch(() => BbPromise.resolve());
});
>>>>>>>
return BbPromise.map(['dev', 'prod'], (env) => {
const depFile = env === 'dev' ? nodeDevDepFile : nodeProdDepFile;
return childProcess.execAsync(
`npm ls --${env}=true --parseable=true --long=false --silent >> ${depFile}`,
{ cwd: dirWithPackageJson }
).catch(() => BbPromise.resolve());
}); |
<<<<<<<
let newProject = serverless.getProject().get();
=======
>>>>>>> |
<<<<<<<
const normalize = require('./lib/sig-util').normalize
const BN = ethUtil.BN
=======
const createId = require('./lib/random-id')
const normalizeAddress = require('./lib/sig-util').normalize
const messageManager = require('./lib/message-manager')
function noop () {}
>>>>>>>
const normalizeAddress = require('./lib/sig-util').normalize
function noop () {}
<<<<<<<
module.exports = class KeyringController extends EventEmitter {
=======
class KeyringController extends EventEmitter {
>>>>>>>
class KeyringController extends EventEmitter {
<<<<<<<
selectedAccount: address,
shapeShiftTxList: this.configManager.getShapeShiftTxList(),
=======
>>>>>>>
<<<<<<<
signMessage (msgParams) {
const address = normalize(msgParams.from)
return this.getKeyringForAccount(address)
.then((keyring) => {
return keyring.signMessage(address, msgParams.data)
})
=======
signMessage (msgParams, cb) {
try {
const msgId = msgParams.metamaskId
delete msgParams.metamaskId
const approvalCb = this._unconfMsgCbs[msgId] || noop
const address = normalizeAddress(msgParams.from)
return this.getKeyringForAccount(address)
.then((keyring) => {
return keyring.signMessage(address, msgParams.data)
}).then((rawSig) => {
cb(null, rawSig)
approvalCb(null, true)
messageManager.confirmMsg(msgId)
return rawSig
})
} catch (e) {
cb(e)
}
>>>>>>>
signMessage (msgParams) {
const address = normalize(msgParams.from)
return this.getKeyringForAccount(address)
.then((keyring) => {
return keyring.signMessage(address, msgParams.data)
})
<<<<<<<
}
=======
}
module.exports = KeyringController
>>>>>>>
}
module.exports = KeyringController |
<<<<<<<
env: 'commandLineEnvVar=commandLineEnvVarValue',
=======
'docker-arg': '-p 9292:9292',
>>>>>>>
env: 'commandLineEnvVar=commandLineEnvVarValue',
'docker-arg': '-p 9292:9292',
<<<<<<<
'--env',
'providerVar=providerValue',
'--env',
'functionVar=functionValue',
'--env',
'commandLineEnvVar=commandLineEnvVarValue',
=======
'-p',
'9292:9292',
>>>>>>>
'--env',
'providerVar=providerValue',
'--env',
'functionVar=functionValue',
'--env',
'commandLineEnvVar=commandLineEnvVarValue',
'-p',
'9292:9292',
<<<<<<<
describe('#getEnvVarsFromOptions', () => {
it('returns empty object when env option is not set', () => {
delete awsInvokeLocal.options.env;
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({});
});
it('returns empty object when env option empty', () => {
awsInvokeLocal.options.env = '';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({});
});
it('returns key value for option separated by =', () => {
awsInvokeLocal.options.env = 'SOME_ENV_VAR=some-value';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({ SOME_ENV_VAR: 'some-value' });
});
it('returns key with empty value for option without =', () => {
awsInvokeLocal.options.env = 'SOME_ENV_VAR';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({ SOME_ENV_VAR: '' });
});
it('returns key with single value for option multiple =s', () => {
awsInvokeLocal.options.env = 'SOME_ENV_VAR=value1=value2';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({ SOME_ENV_VAR: 'value1=value2' });
});
});
=======
describe('#getDockerArgsFromOptions', () => {
it('returns empty list when docker-arg option is absent', () => {
delete awsInvokeLocal.options['docker-arg'];
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql([]);
});
it('returns arg split by space when single docker-arg option is present', () => {
awsInvokeLocal.options['docker-arg'] = '-p 9229:9229';
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql(['-p', '9229:9229']);
});
it('returns args split by space when multiple docker-arg options are present', () => {
awsInvokeLocal.options['docker-arg'] = ['-p 9229:9229', '-v /var/logs:/host-var-logs'];
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql(['-p', '9229:9229', '-v', '/var/logs:/host-var-logs']);
});
it('returns arg split only by first space when docker-arg option has multiple space', () => {
awsInvokeLocal.options['docker-arg'] = '-v /My Docs:/docs';
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql(['-v', '/My Docs:/docs']);
});
});
>>>>>>>
describe('#getEnvVarsFromOptions', () => {
it('returns empty object when env option is not set', () => {
delete awsInvokeLocal.options.env;
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({});
});
it('returns empty object when env option empty', () => {
awsInvokeLocal.options.env = '';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({});
});
it('returns key value for option separated by =', () => {
awsInvokeLocal.options.env = 'SOME_ENV_VAR=some-value';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({ SOME_ENV_VAR: 'some-value' });
});
it('returns key with empty value for option without =', () => {
awsInvokeLocal.options.env = 'SOME_ENV_VAR';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({ SOME_ENV_VAR: '' });
});
it('returns key with single value for option multiple =s', () => {
awsInvokeLocal.options.env = 'SOME_ENV_VAR=value1=value2';
const envVarsFromOptions = awsInvokeLocal.getEnvVarsFromOptions();
expect(envVarsFromOptions).to.be.eql({ SOME_ENV_VAR: 'value1=value2' });
});
});
describe('#getDockerArgsFromOptions', () => {
it('returns empty list when docker-arg option is absent', () => {
delete awsInvokeLocal.options['docker-arg'];
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql([]);
});
it('returns arg split by space when single docker-arg option is present', () => {
awsInvokeLocal.options['docker-arg'] = '-p 9229:9229';
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql(['-p', '9229:9229']);
});
it('returns args split by space when multiple docker-arg options are present', () => {
awsInvokeLocal.options['docker-arg'] = ['-p 9229:9229', '-v /var/logs:/host-var-logs'];
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql(['-p', '9229:9229', '-v', '/var/logs:/host-var-logs']);
});
it('returns arg split only by first space when docker-arg option has multiple space', () => {
awsInvokeLocal.options['docker-arg'] = '-v /My Docs:/docs';
const dockerArgsFromOptions = awsInvokeLocal.getDockerArgsFromOptions();
expect(dockerArgsFromOptions).to.eql(['-v', '/My Docs:/docs']);
});
}); |
<<<<<<<
const { EventEmitter } = require('events')
const { Component } = require('react')
const { connect } = require('react-redux')
=======
const inherits = require('util').inherits
const EventEmitter = require('events').EventEmitter
const Component = require('react').Component
const connect = require('../metamask-connect')
>>>>>>>
const { EventEmitter } = require('events')
const { Component } = require('react')
const connect = require('../metamask-connect')
<<<<<<<
return (
h('.initialize-screen.flex-column.flex-center', [
=======
h('h1', {
style: {
fontSize: '1.3em',
textTransform: 'uppercase',
color: '#7F8082',
marginBottom: 10,
},
}, this.props.t('appName')),
>>>>>>>
return (
h('.initialize-screen.flex-column.flex-center', [
<<<<<<<
h('span.error.in-progress-notification', warning),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
placeholder: t('newPassword'),
onInput: this.inputChanged.bind(this),
=======
]),
h('span.in-progress-notification', state.warning),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
placeholder: this.props.t('newPassword'),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 12,
},
}),
// confirm password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
placeholder: this.props.t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 16,
},
}),
h('button.primary', {
onClick: this.createNewVaultAndKeychain.bind(this),
style: {
margin: 12,
},
}, this.props.t('createDen')),
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
onClick: this.showRestoreVault.bind(this),
>>>>>>>
h('span.error.in-progress-notification', warning),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
placeholder: this.props.t('newPassword'),
onInput: this.inputChanged.bind(this),
<<<<<<<
}),
// confirm password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
placeholder: t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 16,
},
}),
=======
}, this.props.t('importDen')),
]),
>>>>>>>
}),
// confirm password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
placeholder: this.props.t('confirmPassword'),
onKeyPress: this.createVaultOnEnter.bind(this),
onInput: this.inputChanged.bind(this),
style: {
width: 260,
marginTop: 16,
},
}),
<<<<<<<
return {
isInitialized,
isUnlocked,
=======
if (password.length < 8) {
this.warning = this.props.t('passwordShort')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
if (password !== passwordConfirm) {
this.warning = this.props.t('passwordMismatch')
this.props.dispatch(actions.displayWarning(this.warning))
return
>>>>>>>
return {
isInitialized,
isUnlocked, |
<<<<<<<
'webtasks-nodejs',
'aliyun-nodejs',
=======
'twilio-nodejs',
>>>>>>>
'twilio-nodejs',
'aliyun-nodejs', |
<<<<<<<
return awsDeploy.uploadFunctions().then(() => {
const expected = 'Uploading service new-service.zip file to S3 (1 KB)...';
=======
return awsDeploy.uploadFunctionsAndLayers().then(() => {
const expected = 'Uploading service .zip file to S3 (1 KB)...';
>>>>>>>
return awsDeploy.uploadFunctionsAndLayers().then(() => {
const expected = 'Uploading service new-service.zip file to S3 (1 KB)...'; |
<<<<<<<
//log.level = 'silly'
const Wechaty = require('../src/wechaty')
=======
log.level = 'silly'
>>>>>>>
log.level = 'silly'
const Wechaty = require('../src/wechaty')
<<<<<<<
.then(bot.getLoginQrImgUrl.bind(bot))
.then(url => console.log(`Scan qrcode in url to login: \n${url}`))
.catch(e => log.error('Bot', 'bot.init() fail: ' + e))
=======
.then(login)
.catch(e => {
log.error('Bot', 'init() fail:' + e)
bot.quit()
process.exit(-1)
})
>>>>>>>
.then(bot.getLoginQrImgUrl.bind(bot))
.then(url => console.log(`Scan qrcode in url to login: \n${url}`))
.catch(e => {
log.error('Bot', 'init() fail:' + e)
bot.quit()
process.exit(-1)
})
<<<<<<<
bot.on('login' , () => npm.info('Bot', 'logined'))
bot.on('logout' , () => npm.info('Bot', 'logouted'))
=======
function login() {
log.info('Bot', 'Welcome to Wechaty')
bot.puppet
.getLoginQrImgUrl()
.then(url =>
console.log(`\n\nAction needed. Scan the belowing QRCode to login:\n\n${url}\n\nTip: You can copy/paste it to a web browser.\n`)
).catch(e => log.error('Bot', 'promise rejected'))
}
bot.on('login' , e => log.info('Bot', 'logined:' + JSON.stringify(e)))
bot.on('logout' , e => log.info('Bot', 'logouted:' + e))
>>>>>>>
bot.on('login' , () => npm.info('Bot', 'logined'))
bot.on('logout' , () => npm.info('Bot', 'logouted')) |
<<<<<<<
import { o_create, isObject } from './utils';
=======
import { makeSettledResult } from './enumerator';
>>>>>>>
import { isObject } from './utils';
import { makeSettledResult } from './enumerator'; |
<<<<<<<
export function invokeCallback(state, promise, callback, detail) {
=======
function ErrorObject() {
this.error = null;
}
const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, result) {
try {
return callback(result);
} catch(e) {
TRY_CATCH_ERROR.error = e;
return TRY_CATCH_ERROR;
}
}
export function invokeCallback(state, promise, callback, result) {
>>>>>>>
export function invokeCallback(state, promise, callback, result) {
<<<<<<<
value = tryCatch(callback)(detail);
=======
value = tryCatch(callback, result);
>>>>>>>
value = tryCatch(callback)(result); |
<<<<<<<
import { o_create, isArray } from './utils';
=======
>>>>>>>
import { isArray } from './utils';
<<<<<<<
AllSettled.prototype = o_create(Enumerator.prototype);
AllSettled.prototype._superConstructor = Enumerator;
AllSettled.prototype._makeResult = makeSettledResult;
/**
=======
/**
>>>>>>>
AllSettled.prototype._makeResult = makeSettledResult;
/** |
<<<<<<<
h('div', {
className: classnames({
'confirm-screen-section-column--with-error': errors['insufficientFunds'],
'confirm-screen-section-column': !errors['insufficientFunds'],
}),
}, [
h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]),
=======
h('div.confirm-screen-section-column', [
h('span.confirm-screen-label', [ this.context.t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ this.context.t('amountPlusGas') ]),
>>>>>>>
h('div', {
className: classnames({
'confirm-screen-section-column--with-error': errors['insufficientFunds'],
'confirm-screen-section-column': !errors['insufficientFunds'],
}),
}, [
h('span.confirm-screen-label', [ this.context.t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ this.context.t('amountPlusGas') ]),
<<<<<<<
updateSendErrors({ invalidGasParams: this.props.t('invalidGasParams') })
=======
this.props.dispatch(actions.displayWarning(this.context.t('invalidGasParams')))
>>>>>>>
updateSendErrors({ invalidGasParams: this.context.t('invalidGasParams') }) |
<<<<<<<
var vertx = require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
=======
var r = require;
var vertx = r('vertx');
var vertxNext = vertx.runOnLoop || vertx.runOnContext;
>>>>>>>
var r = require;
var vertx = r('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext; |
<<<<<<<
AllSettled.prototype = o_create(Enumerator.prototype);
AllSettled.prototype._superConstructor = Enumerator;
AllSettled.prototype._setResultAt = setSettledResult;
AllSettled.prototype._validationError = function() {
return new Error('allSettled must be called with an array');
};
=======
AllSettled.prototype._makeResult = makeSettledResult;
>>>>>>>
AllSettled.prototype._setResultAt = setSettledResult; |
<<<<<<<
const { isMulti, isSearchable, loadOptions, input, meta, validateOnMount, helperText, ...rest } = useFieldApi(prepareProps(props));
=======
const { isMulti, isSearchable, isClearable, loadOptions, input, meta, validateOnMount, ...rest } = useFieldApi(prepareProps(props));
>>>>>>>
const { isMulti, isSearchable, isClearable, loadOptions, input, meta, validateOnMount, helperText, ...rest } = useFieldApi(prepareProps(props)); |
<<<<<<<
import toJson from 'enzyme-to-json';
import Tabs from '../tabs';
import { mount, shallow } from 'enzyme';
=======
import Tabs from '../files/tabs';
import { mount } from 'enzyme';
>>>>>>>
import Tabs from '../tabs';
import { mount } from 'enzyme'; |
<<<<<<<
var { error, value } = fusion_protocol.query.validate(options);
=======
var { error } = protocol.read.validate(options);
>>>>>>>
var { error } = fusion_protocol.query.validate(options); |
<<<<<<<
const check = error.check;
=======
const server_opts = require('./schema/server.js');
var check = error.check;
>>>>>>>
const server_opts = require('./schema/server.js');
const check = error.check; |
<<<<<<<
h('button.btn-secondary--lg.new-account-create-form__button', {
onClick: () => {
displayWarning(null)
this.props.history.push(DEFAULT_ROUTE)
},
=======
h('button.btn-default.btn--large.new-account-create-form__button', {
onClick: () => this.props.history.push(DEFAULT_ROUTE),
>>>>>>>
h('button.btn-default.btn--large.new-account-create-form__button', {
onClick: () => {
displayWarning(null)
this.props.history.push(DEFAULT_ROUTE)
},
<<<<<<<
.then(({ selectedAddress }) => {
if (selectedAddress) {
history.push(DEFAULT_ROUTE)
} else {
displayWarning('Error importing account.')
setSelectedAddress(firstAddress)
}
})
.catch(err => displayWarning(err))
=======
// JS runtime requires caught rejections but failures are handled by Redux
.catch()
.then(() => history.push(DEFAULT_ROUTE))
>>>>>>>
.then(({ selectedAddress }) => {
if (selectedAddress) {
history.push(DEFAULT_ROUTE)
} else {
displayWarning('Error importing account.')
setSelectedAddress(firstAddress)
}
})
.catch(err => displayWarning(err)) |
<<<<<<<
'$routeParams',
'$route',
'_',
=======
'$state',
>>>>>>>
'$routeParams',
'$route',
'_',
'$state',
<<<<<<<
$routeParams,
$route,
_,
=======
$state,
>>>>>>>
$routeParams,
$route,
_,
$state,
<<<<<<<
$q.all([
FormEndpoint.query().$promise,
WebhookEndpoint.getFresh({id: $routeParams.id}).$promise
]).then(function (response) {
$scope.forms = response[0];
$scope.webhook = response[1];
if ($scope.webhook.form_id) {
$scope.toggleFormAssociation();
var form = _.find($scope.forms, function (form) {
return form.id === $scope.webhook.form_id;
});
$scope.setSelectedForm(form);
}
=======
// @uirouter-refactor this is very wrong.
WebhookEndpoint.getFresh({id: $scope.$resolve.$transition$.params().id}).$promise.then(function (webhook) {
$scope.webhook = webhook;
>>>>>>>
$q.all([
FormEndpoint.query().$promise,
WebhookEndpoint.getFresh({id: $scope.$resolve.$transition$.params().id}).$promise
]).then(function (response) {
$scope.forms = response[0];
$scope.webhook = response[1];
if ($scope.webhook.form_id) {
$scope.toggleFormAssociation();
var form = _.find($scope.forms, function (form) {
return form.id === $scope.webhook.form_id;
});
$scope.setSelectedForm(form);
} |
<<<<<<<
testApp.service('PostFiltersService', require('app/main/posts/views/post-filters.service.js'))
=======
testApp.service('PostFilters', require(ROOT_PATH + 'app/main/posts/views/post-filters.service.js'))
>>>>>>>
testApp.service('PostFilters', require('app/main/posts/views/post-filters.service.js')) |
<<<<<<<
$scope.showNewCollectionInput = false;
$scope.newCollection = '';
$scope.availableRoles = RoleEndpoint.query();
=======
$scope.getRoleDisplayName = RoleHelper.getRole;
$scope.availableRoles = RoleHelper.roles();
>>>>>>>
$scope.availableRoles = RoleEndpoint.query();
<<<<<<<
// Ensure completes stages array is numeric
=======
>>>>>>> |
<<<<<<<
=======
$scope.selectForm = selectForm;
>>>>>>>
$scope.selectForm = selectForm;
<<<<<<<
$scope.medias = {};
$scope.savingText = $translate.instant('app.saving');
$scope.submittingText = $translate.instant('app.submitting');
if ($scope.post.id) {
PostLockService.createSocketListener();
}
}
function setVisibleStage(stageId) {
$scope.visibleStage = stageId;
=======
>>>>>>> |
<<<<<<<
'Notify',
'$q',
'PostActionsService'
=======
'$timeout',
'$location',
'$anchorScroll',
'Notify'
>>>>>>>
'$q',
'PostActionsService'
'$timeout',
'$location',
'$anchorScroll',
'Notify'
<<<<<<<
Notify,
$q,
PostActionsService
) {
=======
$timeout,
$location,
$anchorScroll,
Notify
) {
>>>>>>>
$q,
PostActionsService,
$timeout,
$location,
$anchorScroll,
Notify
) {
<<<<<<<
$scope.resetPosts = resetPosts;
$scope.clearPosts = false;
$scope.clearSelectedPosts = clearSelectedPosts;
=======
$scope.newPostsCount = 0;
$scope.recentPosts = [];
$scope.addNewestPosts = addNewestPosts;
>>>>>>>
$scope.resetPosts = resetPosts;
$scope.clearPosts = false;
$scope.clearSelectedPosts = clearSelectedPosts;
$scope.newPostsCount = 0;
$scope.recentPosts = [];
$scope.addNewestPosts = addNewestPosts;
<<<<<<<
$scope.$watch('selectedPosts.length', function () {
$scope.$emit('post:list:selected', $scope.selectedPosts);
});
=======
checkForNewPosts(30000);
>>>>>>>
$scope.$watch('selectedPosts.length', function () {
$scope.$emit('post:list:selected', $scope.selectedPosts);
});
checkForNewPosts(30000);
<<<<<<<
function deletePosts() {
Notify.confirmDelete('notify.post.bulk_destroy_confirm', { count: $scope.selectedPosts.length }).then(function () {
// ask server to delete selected posts
// and refetch posts from server
$scope.isLoading.state = true;
var deletePostsPromises = _.map(
$scope.selectedPosts,
function (postId) {
$scope.selectedPosts = _.without($scope.selectedPosts, postId);
return PostEndpoint.delete({ id: postId }).$promise;
});
$q.all(deletePostsPromises).then(handleDeleteSuccess, handleDeleteErrors)
;
function handleDeleteErrors(errorResponse) {
$scope.isLoading.state = false;
Notify.apiErrors(errorResponse);
}
function handleDeleteSuccess(deleted) {
$scope.isLoading.state = false;
Notify.notify('notify.post.destroy_success_bulk');
// Remove deleted posts from state
var deletedIds = _.pluck(deleted, 'id');
angular.forEach($scope.groupedPosts, function (posts, group) {
$scope.groupedPosts[group] = _.reject(posts, function (post) {
return _.contains(deletedIds, post.id);
});
});
$scope.posts = _.reject($scope.posts, function (post) {
return _.contains(deletedIds, post.id);
});
clearSelectedPosts();
if (!$scope.posts.length) {
$scope.clearPosts = true;
getPosts();
}
}
});
}
function changeStatus(status) {
var selectedPosts = _.filter($scope.posts, function (post) {
return _.contains($scope.selectedPosts, post.id);
});
var count = $scope.selectedPosts.length;
var updateStatusPromises = _.map(selectedPosts, function (post) {
post.status = status;
// $scope.selectedPosts = _.without($scope.selectedPosts, post.id);
return PostEndpoint.update(post).$promise;
});
$q.all(updateStatusPromises).then(function () {
Notify.notify('notify.post.update_status_success_bulk', {count: count});
clearSelectedPosts();
}, function (errorResponse) {
Notify.apiErrors(errorResponse);
})
;
}
function groupPosts(posts) {
=======
function createPostGroups(posts) {
>>>>>>>
function deletePosts() {
Notify.confirmDelete('notify.post.bulk_destroy_confirm', { count: $scope.selectedPosts.length }).then(function () {
// ask server to delete selected posts
// and refetch posts from server
$scope.isLoading.state = true;
var deletePostsPromises = _.map(
$scope.selectedPosts,
function (postId) {
$scope.selectedPosts = _.without($scope.selectedPosts, postId);
return PostEndpoint.delete({ id: postId }).$promise;
});
$q.all(deletePostsPromises).then(handleDeleteSuccess, handleDeleteErrors)
;
function handleDeleteErrors(errorResponse) {
$scope.isLoading.state = false;
Notify.apiErrors(errorResponse);
}
function handleDeleteSuccess(deleted) {
$scope.isLoading.state = false;
Notify.notify('notify.post.destroy_success_bulk');
// Remove deleted posts from state
var deletedIds = _.pluck(deleted, 'id');
angular.forEach($scope.groupedPosts, function (posts, group) {
$scope.groupedPosts[group] = _.reject(posts, function (post) {
return _.contains(deletedIds, post.id);
});
});
$scope.posts = _.reject($scope.posts, function (post) {
return _.contains(deletedIds, post.id);
});
clearSelectedPosts();
if (!$scope.posts.length) {
$scope.clearPosts = true;
getPosts();
}
}
});
}
function changeStatus(status) {
var selectedPosts = _.filter($scope.posts, function (post) {
return _.contains($scope.selectedPosts, post.id);
});
var count = $scope.selectedPosts.length;
var updateStatusPromises = _.map(selectedPosts, function (post) {
post.status = status;
// $scope.selectedPosts = _.without($scope.selectedPosts, post.id);
return PostEndpoint.update(post).$promise;
});
$q.all(updateStatusPromises).then(function () {
Notify.notify('notify.post.update_status_success_bulk', {count: count});
clearSelectedPosts();
}, function (errorResponse) {
Notify.apiErrors(errorResponse);
})
;
}
function createPostGroups(posts) {
<<<<<<<
function selectBulkActions() {
$scope.bulkActionsSelected = 'toolbar-active';
$rootScope.$broadcast('bulkActionsSelected:true');
}
function closeBulkActions() {
$scope.bulkActionsSelected = '';
$rootScope.$broadcast('bulkActionsSelected:false');
}
function clearSelectedPosts() {
// Clear selected posts
$scope.selectedPosts.splice(0);
}
function userHasBulkActionPermissions() {
return _.any($scope.posts, function (post) {
return _.intersection(post.allowed_privileges, ['update', 'delete', 'change_status']).length > 0;
});
}
=======
function getNewPosts() {
var existingFilters = PostFilters.getQueryParams($scope.filters);
var filterDate = moment(existingFilters.date_before).format('MMM Do YY');
var now = moment().format('MMM Do YY');
if (filterDate >= now) {
var mostRecentPostDate = $scope.recentPosts[0] ? $scope.recentPosts[0].post_date : $scope.posts[0].post_date;
existingFilters.date_after = mostRecentPostDate;
var query = existingFilters;
var postQuery = _.extend({}, query, {
order: $scope.filters.order,
orderby: $scope.filters.orderby
});
PostEndpoint.query(postQuery).$promise.then(function (postsResponse) {
Array.prototype.unshift.apply($scope.recentPosts, postsResponse.results);
$scope.newPostsCount += postsResponse.count;
});
}
}
function addNewestPosts() {
Array.prototype.unshift.apply($scope.posts, $scope.recentPosts);
groupPosts($scope.recentPosts);
$scope.totalItems = $scope.totalItems + $scope.newPostsCount;
$scope.recentPosts = [];
$scope.newPostsCount = 0;
$location.hash('post-data-view-top');
$anchorScroll();
}
function checkForNewPosts(time) {
if ($scope.posts.length) {
getNewPosts();
}
$timeout(checkForNewPosts, time, true, time);
}
>>>>>>>
function selectBulkActions() {
$scope.bulkActionsSelected = 'toolbar-active';
$rootScope.$broadcast('bulkActionsSelected:true');
}
function closeBulkActions() {
$scope.bulkActionsSelected = '';
$rootScope.$broadcast('bulkActionsSelected:false');
}
function clearSelectedPosts() {
// Clear selected posts
$scope.selectedPosts.splice(0);
}
function userHasBulkActionPermissions() {
return _.any($scope.posts, function (post) {
return _.intersection(post.allowed_privileges, ['update', 'delete', 'change_status']).length > 0;
});
function getNewPosts() {
var existingFilters = PostFilters.getQueryParams($scope.filters);
var filterDate = moment(existingFilters.date_before).format('MMM Do YY');
var now = moment().format('MMM Do YY');
if (filterDate >= now) {
var mostRecentPostDate = $scope.recentPosts[0] ? $scope.recentPosts[0].post_date : $scope.posts[0].post_date;
existingFilters.date_after = mostRecentPostDate;
var query = existingFilters;
var postQuery = _.extend({}, query, {
order: $scope.filters.order,
orderby: $scope.filters.orderby
});
PostEndpoint.query(postQuery).$promise.then(function (postsResponse) {
Array.prototype.unshift.apply($scope.recentPosts, postsResponse.results);
$scope.newPostsCount += postsResponse.count;
});
}
}
function addNewestPosts() {
Array.prototype.unshift.apply($scope.posts, $scope.recentPosts);
groupPosts($scope.recentPosts);
$scope.totalItems = $scope.totalItems + $scope.newPostsCount;
$scope.recentPosts = [];
$scope.newPostsCount = 0;
$location.hash('post-data-view-top');
$anchorScroll();
}
function checkForNewPosts(time) {
if ($scope.posts.length) {
getNewPosts();
}
$timeout(checkForNewPosts, time, true, time);
} |
<<<<<<<
var commit = '7f31439';
=======
var commit = '24a7033';
>>>>>>>
var commit = '001789f';
<<<<<<<
this.capUpdAfterInit = true;
=======
this.b = '';
this.checkForm = emptyFn;
>>>>>>>
this.b = '';
this.capUpdAfterInit = true;
<<<<<<<
var _this48 = _possibleConstructorReturn(this, Object.getPrototypeOf(Tinyboard).call(this, prot, dm));
_this48.tiny = true;
_this48.cFileInfo = 'fileinfo';
_this48.cPostHeader = 'intro';
_this48.cReply = 'post reply';
_this48.qClosed = '.fa-lock';
_this48.cSubj = 'subject';
_this48.cTrip = 'trip';
_this48.qDForm = 'form[name*="postcontrols"]';
_this48.qMsg = '.body';
_this48.qName = '.name';
_this48.qOmitted = '.omitted';
_this48.qPages = '.pages > a:nth-last-of-type(2)';
_this48.qPostForm = 'form[name="post"]';
_this48.qPostRedir = null;
_this48.qRef = '.post_no + a';
_this48.qTable = '.post.reply';
_this48.qTrunc = '.toolong';
_this48.firstPage = 1;
_this48.timePattern = 'nn+dd+yy++w++hh+ii+ss';
_this48.thrid = 'thread';
return _this48;
=======
var _this49 = _possibleConstructorReturn(this, Object.getPrototypeOf(Tinyboard).call(this, prot, dm));
_this49.tiny = true;
_this49.cFileInfo = 'fileinfo';
_this49.cPostHeader = 'intro';
_this49.cReply = 'post reply';
_this49.qClosed = '.fa-lock';
_this49.cSubj = 'subject';
_this49.cTrip = 'trip';
_this49.qDForm = 'form[name*="postcontrols"]';
_this49.qMsg = '.body';
_this49.qName = '.name';
_this49.qOmitted = '.omitted';
_this49.qPages = '.pages > a:nth-last-of-type(2)';
_this49.qPostForm = 'form[name="post"]';
_this49.qPostRedir = null;
_this49.qRef = '.post_no + a';
_this49._qTable = '.post.reply';
_this49.qTrunc = '.toolong';
_this49.firstPage = 1;
_this49.timePattern = 'nn+dd+yy++w++hh+ii+ss';
_this49.thrid = 'thread';
return _this49;
>>>>>>>
var _this48 = _possibleConstructorReturn(this, Object.getPrototypeOf(Tinyboard).call(this, prot, dm));
_this48.tiny = true;
_this48.cFileInfo = 'fileinfo';
_this48.cPostHeader = 'intro';
_this48.cReply = 'post reply';
_this48.qClosed = '.fa-lock';
_this48.cSubj = 'subject';
_this48.cTrip = 'trip';
_this48.qDForm = 'form[name*="postcontrols"]';
_this48.qMsg = '.body';
_this48.qName = '.name';
_this48.qOmitted = '.omitted';
_this48.qPages = '.pages > a:nth-last-of-type(2)';
_this48.qPostForm = 'form[name="post"]';
_this48.qPostRedir = null;
_this48.qRef = '.post_no + a';
_this48._qTable = '.post.reply';
_this48.qTrunc = '.toolong';
_this48.firstPage = 1;
_this48.timePattern = 'nn+dd+yy++w++hh+ii+ss';
_this48.thrid = 'thread';
return _this48;
<<<<<<<
var Claire = (function (_BaseBoard7) {
_inherits(Claire, _BaseBoard7);
function Claire(prot, dm) {
_classCallCheck(this, Claire);
var _this52 = _possibleConstructorReturn(this, Object.getPrototypeOf(Claire).call(this, prot, dm));
_this52.qDForm = '#mainc';
return _this52;
}
_createClass(Claire, [{
key: 'getPageUrl',
value: function getPageUrl(b, p) {
return fixBrd(b) + '?do=page&p=' + (p < 0 ? 0 : p);
}
}, {
key: 'getThrdUrl',
value: function getThrdUrl(b, tNum) {
return this.prot + '//' + this.host + fixBrd(b) + '?do=thread&id=' + tNum;
}
}, {
key: 'getTNum',
value: function getTNum(op) {
return +$q('a[name]', op).name.match(/\d+/)[0];
}
}, {
key: 'init',
value: function init() {
var el = $id('mainc'),
pArea = $id('postarea');
$del(el.firstElementChild);
$before(el, pArea.nextElementSibling);
$before(el, pArea);
return false;
}
}, {
key: 'parseURL',
value: function parseURL() {
var url = window.location.search.match(/^\?do=(thread|page)&(id|p)=(\d+)$/);
this.b = window.location.pathname.replace(/\//g, '');
this.t = url[1] === 'thread' ? +url[3] : false;
this.page = url[1] === 'page' ? +url[3] : 0;
this.docExt = '';
}
}, {
key: 'css',
get: function get() {
return '.reply { background-color: #e4e4d6; }';
}
}]);
return Claire;
})(BaseBoard);
ibEngines['div#mainc'] = Claire;
var _02chNet = (function (_BaseBoard8) {
_inherits(_02chNet, _BaseBoard8);
=======
var _02chNet = (function (_BaseBoard7) {
_inherits(_02chNet, _BaseBoard7);
>>>>>>>
var _02chNet = (function (_BaseBoard7) {
_inherits(_02chNet, _BaseBoard7);
<<<<<<<
var _this70 = _possibleConstructorReturn(this, Object.getPrototypeOf(Krautchan).call(this, prot, dm));
_this70.krau = true;
_this70.cFileInfo = 'fileinfo';
_this70.cPostHeader = 'postheader';
_this70.cReply = 'postreply';
_this70.cSubj = 'postsubject';
_this70.qBan = '.ban_mark';
_this70.qClosed = 'img[src="/images/locked.gif"]';
_this70.qDForm = 'form[action*="delete"]';
_this70.qError = '.message_text';
_this70.qOmitted = '.omittedinfo';
_this70.qPages = 'table[border="1"] > tbody > tr > td > a:nth-last-child(2) + a';
_this70.qPostRedir = 'input#forward_thread';
_this70.qRef = '.postnumber';
_this70.qRPost = '.postreply';
_this70.qThumbImages = 'img[id^="thumbnail_"]';
_this70.qTrunc = 'p[id^="post_truncated"]';
_this70.getCaptchaSrc = null;
_this70.hasPicWrap = true;
_this70.markupBB = true;
_this70.multiFile = true;
_this70.res = 'thread-';
_this70.timePattern = 'yyyy+nn+dd+hh+ii+ss+--?-?-?-?-?';
return _this70;
=======
var _this67 = _possibleConstructorReturn(this, Object.getPrototypeOf(Krautchan).call(this, prot, dm));
_this67.krau = true;
_this67.cFileInfo = 'fileinfo';
_this67.cPostHeader = 'postheader';
_this67.cReply = 'postreply';
_this67.cSubj = 'postsubject';
_this67.qBan = '.ban_mark';
_this67.qClosed = 'img[src="/images/locked.gif"]';
_this67.qDForm = 'form[action*="delete"]';
_this67.qError = '.message_text';
_this67.qOmitted = '.omittedinfo';
_this67.qPages = 'table[border="1"] > tbody > tr > td > a:nth-last-child(2) + a';
_this67.qPostRedir = 'input#forward_thread';
_this67.qRef = '.postnumber';
_this67.qRPost = '.postreply';
_this67.qThumbImages = 'img[id^="thumbnail_"]';
_this67.qTrunc = 'p[id^="post_truncated"]';
_this67.hasPicWrap = true;
_this67.markupBB = true;
_this67.multiFile = true;
_this67.res = 'thread-';
_this67.timePattern = 'yyyy+nn+dd+hh+ii+ss+--?-?-?-?-?';
return _this67;
>>>>>>>
var _this69 = _possibleConstructorReturn(this, Object.getPrototypeOf(Krautchan).call(this, prot, dm));
_this69.krau = true;
_this69.cFileInfo = 'fileinfo';
_this69.cPostHeader = 'postheader';
_this69.cReply = 'postreply';
_this69.cSubj = 'postsubject';
_this69.qBan = '.ban_mark';
_this69.qClosed = 'img[src="/images/locked.gif"]';
_this69.qDForm = 'form[action*="delete"]';
_this69.qError = '.message_text';
_this69.qOmitted = '.omittedinfo';
_this69.qPages = 'table[border="1"] > tbody > tr > td > a:nth-last-child(2) + a';
_this69.qPostRedir = 'input#forward_thread';
_this69.qRef = '.postnumber';
_this69.qRPost = '.postreply';
_this69.qThumbImages = 'img[id^="thumbnail_"]';
_this69.qTrunc = 'p[id^="post_truncated"]';
_this69.getCaptchaSrc = null;
_this69.hasPicWrap = true;
_this69.markupBB = true;
_this69.multiFile = true;
_this69.res = 'thread-';
_this69.timePattern = 'yyyy+nn+dd+hh+ii+ss+--?-?-?-?-?';
return _this69;
<<<<<<<
var _this74 = this;
=======
var _this71 = this;
>>>>>>>
var _this73 = this;
<<<<<<<
return _this74.modifiedPosts.set(pEl, +pEl.getAttribute('data-lastmodified'));
=======
return _this71.modifiedPosts.set(pEl, +pEl.getAttribute('data-lastmodified'));
>>>>>>>
return _this73.modifiedPosts.set(pEl, +pEl.getAttribute('data-lastmodified'));
<<<<<<<
post = pByNum.get(_this74.getPNum(pEl)),
=======
post = pByNum.get(_this71.getPNum(pEl)),
>>>>>>>
post = pByNum.get(_this73.getPNum(pEl)),
<<<<<<<
if (post && (!_this74.modifiedPosts.has(pEl) || _this74.modifiedPosts.get(pEl) < pDate)) {
=======
if (post && (!_this71.modifiedPosts.has(pEl) || _this71.modifiedPosts.get(pEl) < pDate)) {
>>>>>>>
if (post && (!_this73.modifiedPosts.has(pEl) || _this73.modifiedPosts.get(pEl) < pDate)) {
<<<<<<<
_this74.modifiedPosts.set(pEl, pDate);
=======
_this71.modifiedPosts.set(pEl, pDate);
>>>>>>>
_this73.modifiedPosts.set(pEl, pDate);
<<<<<<<
var _this77 = this;
=======
var _this74 = this;
>>>>>>>
var _this76 = this;
<<<<<<<
return _this77._el.play();
=======
return _this74._el.play();
>>>>>>>
return _this76._el.play();
<<<<<<<
var _this78 = this;
=======
var _this75 = this;
>>>>>>>
var _this77 = this;
<<<<<<<
_this78._stop();
=======
_this75._stop();
>>>>>>>
_this77._stop();
<<<<<<<
_this78._set(seconds);
=======
_this75._set(seconds);
>>>>>>>
_this77._set(seconds);
<<<<<<<
_this78._countingTO = null;
=======
_this75._countingTO = null;
>>>>>>>
_this77._countingTO = null;
<<<<<<<
var _this79 = this;
=======
var _this76 = this;
>>>>>>>
var _this78 = this;
<<<<<<<
_this79._setIcon(_this79._isOriginalIcon ? _this79._currentIcon : _this79.originalIcon);
_this79._isOriginalIcon = !_this79._isOriginalIcon;
=======
_this76._setIcon(_this76._isOriginalIcon ? _this76._currentIcon : _this76.originalIcon);
_this76._isOriginalIcon = !_this76._isOriginalIcon;
>>>>>>>
_this78._setIcon(_this78._isOriginalIcon ? _this78._currentIcon : _this78.originalIcon);
_this78._isOriginalIcon = !_this78._isOriginalIcon;
<<<<<<<
var _this80 = this;
=======
var _this77 = this;
>>>>>>>
var _this79 = this;
<<<<<<<
if (notif === _this80._notifEl) {
_this80.close();
=======
if (notif === _this77._notifEl) {
_this77.close();
>>>>>>>
if (notif === _this79._notifEl) {
_this79.close();
<<<<<<<
_this80._requestPermission();
=======
_this77._requestPermission();
>>>>>>>
_this79._requestPermission();
<<<<<<<
var _this81 = this;
=======
var _this78 = this;
>>>>>>>
var _this80 = this;
<<<<<<<
_this81._granted = true;
=======
_this78._granted = true;
>>>>>>>
_this80._granted = true;
<<<<<<<
var _this82 = this;
=======
var _this79 = this;
>>>>>>>
var _this81 = this;
<<<<<<<
return _this82._makeStep();
=======
return _this79._makeStep();
>>>>>>>
return _this81._makeStep(); |
<<<<<<<
h('span.new-account-create-form__instruction', t('pastePrivateKey')),
=======
>>>>>>>
h('span.new-account-create-form__instruction', t('pastePrivateKey')), |
<<<<<<<
.config(function ($urlRouterProvider) {
$urlRouterProvider.when('', '/views/map');
$urlRouterProvider.when('/', '/views/map');
=======
.config(function ($urlRouterProvider, $urlMatcherFactoryProvider) {
>>>>>>>
.config(function ($urlRouterProvider, $urlMatcherFactoryProvider) {
$urlRouterProvider.when('', '/views/map');
$urlRouterProvider.when('/', '/views/map');
<<<<<<<
$urlRouterProvider.otherwise('/404');
=======
// $urlRouterProvider.otherwise('/views/map');
$urlMatcherFactoryProvider.strictMode(false);
>>>>>>>
$urlRouterProvider.otherwise('/404');
$urlMatcherFactoryProvider.strictMode(false); |
<<<<<<<
var filterMode = 'all';
var entityId = null;
=======
var tags = [];
>>>>>>>
var filterMode = 'all';
var entityId = null;
var tags = [];
<<<<<<<
if (filterMode === 'collection') {
query.set = [entityId].concat(query.set);
}
=======
>>>>>>>
if (filterMode === 'collection') {
query.set = [entityId].concat(query.set);
} |
<<<<<<<
beforeEach(angular.mock.inject(function (_$rootScope_, $compile, _PostEndpoint_, _PostActionsService_) {
=======
beforeEach(inject(function (_$rootScope_, $compile, _PostEndpoint_, _PostActionsService_, _$location_) {
>>>>>>>
beforeEach(angular.mock.inject(function (_$rootScope_, $compile, _PostEndpoint_, _PostActionsService_, _$location_) { |
<<<<<<<
if (keys.find(function(key){return key === 'toc'})) {
=======
if(keys.indexOf('toc') >= 0) {
>>>>>>>
if(keys.indexOf('toc') >= 0) {
<<<<<<<
child.on('exit', function(code) {
if (code !== 0 && stderrMessages.length > 0) {
handleError(stderrMessages);
} else if (callback) {
callback(null, stream); // stream is child.stdout
}
});
=======
if (callback) {
child.on('exit', function() { callback(null); });
}
>>>>>>>
child.on('exit', function(code) {
if (code !== 0) {
stderrMessages.push('wkhtmltopdf exited with code ' + code);
handleError(stderrMessages);
} else if (callback) {
callback(null, stream); // stream is child.stdout
}
});
<<<<<<<
=======
>>>>>>>
<<<<<<<
child.once('error', function(err) {
throw new Error(err); // critical error
});
=======
child.once('error', handleError);
>>>>>>>
child.once('error', function(err) {
throw new Error(err); // critical error
}); |
<<<<<<<
path,
prefs.outputCSSFile.fullPath,
options.includePaths,
options.imagePath,
options.outputStyle,
options.sourceComments,
sourceMap,
compiler);
=======
path,
options.includePaths,
options.imagePath,
options.outputStyle,
options.sourceComments,
sourceMap,
prefs.compiler,
prefs.compass);
>>>>>>>
path,
prefs.outputCSSFile.fullPath,
options.includePaths,
options.imagePath,
options.outputStyle,
options.sourceComments,
sourceMap,
prefs.compiler,
prefs.compass); |
<<<<<<<
checkConfig(configFile)
}
if (headlessConfig) {
checkConfig(headlessConfig)
=======
if (!fs.existsSync(configFile)) {
error(`Configuration file "${configFile}" doesn't exist`)
} else if (!/\.(?:json)$/.test(configFile)) {
error(`Config file must end with ".json"`)
}
mermaidConfig = Object.assign(mermaidConfig, JSON.parse(fs.readFileSync(configFile, 'utf-8')))
>>>>>>>
checkConfig(configFile)
mermaidConfig = Object.assign(mermaidConfig, JSON.parse(fs.readFileSync(configFile, 'utf-8')))
}
if (headlessConfig) {
checkConfig(headlessConfig)
<<<<<<<
;(async () => {
const headlessOpts = (headlessConfig)
? JSON.parse(fs.readFileSync(headlessConfig, 'utf-8'))
: {}
const browser = await puppeteer.launch(headlessOpts)
=======
(async () => {
const browser = await puppeteer.launch()
>>>>>>>
(async () => {
const headlessOpts = (headlessConfig)
? JSON.parse(fs.readFileSync(headlessConfig, 'utf-8'))
: {}
const browser = await puppeteer.launch(headlessOpts)
<<<<<<<
var myconfig, myCSS
if (configFile) {
myconfig = JSON.parse(fs.readFileSync(configFile, 'utf-8'))
}
if (cssFile) {
myCSS = fs.readFileSync(cssFile, 'utf-8')
}
await page.$eval('#container', (container, definition, theme, myconfig, myCSS) => {
=======
await page.$eval('#container', (container, definition, mermaidConfig, myCSS) => {
>>>>>>>
await page.$eval('#container', (container, definition, mermaidConfig, myCSS) => { |
<<<<<<<
unapprovedTxs: state.metamask.unapprovedTxs,
selectedAccount: state.metamask.selectedAccount,
=======
unconfTxs: state.metamask.unconfTxs,
selectedAddress: state.metamask.selectedAddress,
>>>>>>>
unapprovedTxs: state.metamask.unapprovedTxs,
selectedAddress: state.metamask.selectedAddress, |
<<<<<<<
if (k == opts.keyCode.TAB && $input.hasClass('focus.inputmask') && input._valueGet().length == 0) {
buffer = getActiveBuffer().slice();
=======
if (k == opts.keyCode.TAB && $input.hasClass('focus.inputmask') && input._valueGet().length == 0 && opts.showMaskOnFocus) {
buffer = _buffer.slice();
>>>>>>>
if (k == opts.keyCode.TAB && $input.hasClass('focus.inputmask') && input._valueGet().length == 0 && opts.showMaskOnFocus) {
buffer = getActiveBuffer().slice(); |
<<<<<<<
* Version: 2.0.9
=======
* Version: 1.3.0
>>>>>>>
* Version: 2.0.9b
<<<<<<<
case "isComplete":
masksets = this.data('inputmask')['masksets'];
activeMasksetIndex = this.data('inputmask')['activeMasksetIndex'];
=======
case "isComplete":
var tests = this.data('inputmask')['tests'];
var _buffer = this.data('inputmask')['_buffer'];
>>>>>>>
case "isComplete":
masksets = this.data('inputmask')['masksets'];
activeMasksetIndex = this.data('inputmask')['activeMasksetIndex'];
<<<<<<<
for (var i = start, maskL = getMaskLength(); i < end && i < maskL; i++) {
setBufferElement(buffer, i, getBufferElement(getActiveBuffer().slice(), i));
=======
for (var i = start, maskL = getMaskLength() ; i < end && i < maskL; i++) {
setBufferElement(buffer, i, getBufferElement(_buffer.slice(), i));
>>>>>>>
for (var i = start, maskL = getMaskLength() ; i < end && i < maskL; i++) {
setBufferElement(buffer, i, getBufferElement(getActiveBuffer().slice(), i));
<<<<<<<
function isComplete(npt) {
var complete = false, nptValue = npt._valueGet(), ml = nptValue.length
currentActiveMasksetIndex = activeMasksetIndex, highestValidPosition = 0;
$.each(masksets, function (ndx, ms) {
activeMasksetIndex = ndx;
var aml = getMaskLength();
if (ms["lastValidPosition"] >= highestValidPosition && ms["lastValidPosition"] == (aml - 1)) {
var msComplete = true;
for (var i = 0; i < aml; i++) {
var mask = isMask(i);
if ((mask && nptValue.charAt(i) == getPlaceHolder(i)) || (!mask && nptValue.charAt(i) != getActiveBuffer()[i])) {
msComplete = false;
break;
}
}
complete = complete || msComplete;
if (complete) //break loop
return false;
}
highestValidPosition = ms["lastValidPosition"];
});
activeMasksetIndex = currentActiveMasksetIndex; //reset activeMaskset
return complete;
=======
function isComplete(npt) {
var complete = true, nptValue = npt._valueGet(), ml = nptValue.length;
for (var i = 0; i < ml; i++) {
if (isMask(i) && nptValue.charAt(i) == getPlaceHolder(i)) {
complete = false;
break;
}
}
return complete;
>>>>>>>
function isComplete(npt) {
var complete = false, nptValue = npt._valueGet(), ml = nptValue.length
currentActiveMasksetIndex = activeMasksetIndex, highestValidPosition = 0;
$.each(masksets, function (ndx, ms) {
activeMasksetIndex = ndx;
var aml = getMaskLength();
if (ms["lastValidPosition"] >= highestValidPosition && ms["lastValidPosition"] == (aml - 1)) {
var msComplete = true;
for (var i = 0; i < aml; i++) {
var mask = isMask(i);
if ((mask && nptValue.charAt(i) == getPlaceHolder(i)) || (!mask && nptValue.charAt(i) != getActiveBuffer()[i])) {
msComplete = false;
break;
}
}
complete = complete || msComplete;
if (complete) //break loop
return false;
}
highestValidPosition = ms["lastValidPosition"];
});
activeMasksetIndex = currentActiveMasksetIndex; //reset activeMaskset
return complete;
<<<<<<<
refresh = np["refresh"]; //only rewrite buffer from isValid
p = np.pos || p; //set new position from isValid
c = np.c || c; //set new char from isValid
=======
p = np.pos != undefined ? np.pos : p; //set new position from isValid
c = np.c != undefined ? np.c : c; //set new char from isValid
>>>>>>>
refresh = np["refresh"]; //only rewrite buffer from isValid
p = np.pos != undefined ? np.pos : p; //set new position from isValid
c = np.c != undefined ? np.c : c; //set new char from isValid
<<<<<<<
refresh = np["refresh"]; //only rewrite buffer from isValid
p = np.pos || p; //set new position from isValid
c = np.c || c; //set new char from isValid
=======
p = np.pos != undefined ? np.pos : p; //set new position from isValid
c = np.c != undefined ? np.c : c; //set new char from isValid
>>>>>>>
refresh = np["refresh"]; //only rewrite buffer from isValid
p = np.pos != undefined ? np.pos : p; //set new position from isValid
c = np.c != undefined ? np.c : c; //set new char from isValid |
<<<<<<<
let clock, network, preferences, controller, keyringMemStore
const sandbox = sinon.createSandbox()
const noop = () => {}
const networkControllerProviderConfig = {
getAccounts: noop,
}
beforeEach(async () => {
nock('https://api.infura.io')
.get(/.*/)
.reply(200)
keyringMemStore = new ObservableStore({ isUnlocked: false})
network = new NetworkController()
preferences = new PreferencesController()
controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore })
network.initializeProvider(networkControllerProviderConfig)
})
after(() => {
sandbox.restore()
nock.cleanAll()
=======
const sandbox = sinon.createSandbox()
let clock, keyringMemStore, network, preferences
beforeEach(async () => {
keyringMemStore = new ObservableStore({ isUnlocked: false})
network = new NetworkController({ provider: { type: 'mainnet' }})
preferences = new PreferencesController({ network })
})
after(() => {
sandbox.restore()
>>>>>>>
const sandbox = sinon.createSandbox()
let clock, keyringMemStore, network, preferences, controller
const noop = () => {}
const networkControllerProviderConfig = {
getAccounts: noop,
}
beforeEach(async () => {
nock('https://api.infura.io')
.get(/.*/)
.reply(200)
keyringMemStore = new ObservableStore({ isUnlocked: false})
network = new NetworkController()
preferences = new PreferencesController({ network })
controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore })
network.initializeProvider(networkControllerProviderConfig)
})
after(() => {
sandbox.restore()
nock.cleanAll()
<<<<<<<
const network = new NetworkController()
network.initializeProvider(networkControllerProviderConfig)
=======
>>>>>>>
const network = new NetworkController()
network.initializeProvider(networkControllerProviderConfig)
<<<<<<<
=======
const controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore })
>>>>>>>
// const controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore }) |
<<<<<<<
* Version: 2.1.16
=======
* Version: 1.3.17
>>>>>>>
* Version: 2.1.17
<<<<<<<
android534;
//if (android) {
// var browser = navigator.userAgent.match(/safari.*/i);
// var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
// android = (version <= 533);
// android534 = (533 < version) && (version <= 534);
//}
var masksets,
activeMasksetIndex = 0;
=======
android533;
if (android) {
var browser = navigator.userAgent.match(/safari.*/i);
var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
android533 = (version <= 533);
//android534 = (533 < version) && (version <= 534);
}
>>>>>>>
android533;
if (android) {
var browser = navigator.userAgent.match(/safari.*/i);
var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
android533 = (version <= 533);
//android534 = (533 < version) && (version <= 534);
}
var masksets,
activeMasksetIndex = 0;
<<<<<<<
caret(input, caretSavePoint.begin, caretSavePoint.end);
=======
caret(input, caretSavePoint.begin, caretSavePoint.end);
>>>>>>>
caret(input, caretSavePoint.begin, caretSavePoint.end);
<<<<<<<
Version: 2.1.16
=======
Version: 1.3.17
>>>>>>>
Version: 2.1.17
<<<<<<<
Version: 2.1.16
=======
Version: 1.3.17
>>>>>>>
Version: 2.1.17
<<<<<<<
Version: 2.1.16
=======
Version: 1.3.17
>>>>>>>
Version: 2.1.17 |
<<<<<<<
var valueBuffer = actionObj["value"].split('');
checkVal($el, false, false, isRTL ? valueBuffer.reverse() : valueBuffer, true);
return isRTL ? getBuffer().reverse().join('') : getBuffer().join('');
=======
var valueBuffer = actionObj["value"].split('');
checkVal($el, false, false, isRTL ? valueBuffer.reverse() : valueBuffer, true);
return isRTL ? getActiveBuffer().reverse().join('') : getActiveBuffer().join('');
>>>>>>>
var valueBuffer = actionObj["value"].split('');
checkVal($el, false, false, isRTL ? valueBuffer.reverse() : valueBuffer, true);
return isRTL ? getBuffer().reverse().join('') : getBuffer().join('');
<<<<<<<
var valueBuffer = actionObj["value"].split('');
checkVal($el, false, true, isRTL ? valueBuffer.reverse() : valueBuffer);
return isComplete(getBuffer());
=======
var valueBuffer = actionObj["value"].split('');
checkVal($el, false, true, isRTL ? valueBuffer.reverse() : valueBuffer);
return isComplete(getActiveBuffer());
>>>>>>>
var valueBuffer = actionObj["value"].split('');
checkVal($el, false, true, isRTL ? valueBuffer.reverse() : valueBuffer);
return isComplete(getBuffer());
<<<<<<<
maskset = this.data('_inputmask')['maskset'];
opts = this.data('_inputmask')['opts'];
return maskScope(maskset, opts, { "action": "isComplete", "buffer": this[0]._valueGet().split('') });
=======
if (this.data('_inputmask')) {
masksets = this.data('_inputmask')['masksets'];
activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
opts = this.data('_inputmask')['opts'];
return maskScope(masksets, activeMasksetIndex, opts, { "action": "isComplete", "buffer": this[0]._valueGet().split('') });
}
else return true;
>>>>>>>
if (this.data('_inputmask')) {
maskset = this.data('_inputmask')['maskset'];
opts = this.data('_inputmask')['opts'];
return maskScope(maskset, opts, { "action": "isComplete", "buffer": this[0]._valueGet().split('') });
}
else return true; |
<<<<<<<
await this.balancesController.updateAllBalances()
=======
await this.txController.pendingTxTracker.updatePendingTxs()
>>>>>>>
await this.balancesController.updateAllBalances()
await this.txController.pendingTxTracker.updatePendingTxs() |
<<<<<<<
nav, aib, brd, res, TNum, pageNum, docExt, docTitle,
pr, dForm, oeForm, dummy, postWrapper, spells, aSpellTO,
=======
nav, aib, brd, TNum, pageNum, docExt, docTitle,
pr, dForm, oeForm, dummy, postWrapper,
>>>>>>>
nav, aib, brd, TNum, pageNum, docExt, docTitle,
pr, dForm, oeForm, dummy, postWrapper, spells, aSpellTO, |
<<<<<<<
if (!props.noActiveNotices) {
=======
if (!props.noActiveNotices && !global.METAMASK_DEBUG) {
log.debug('rendering notice screen for unread notices.')
>>>>>>>
if (!props.noActiveNotices) {
log.debug('rendering notice screen for unread notices.') |
<<<<<<<
* Version: 2.6.0
=======
* Version: 2.4.11
>>>>>>>
* Version: 2.6.0
<<<<<<<
if (getBufferElement(buffer, start, true) != getPlaceholder(start)) {
for (var i = seekPrevious(end); i > start && i >= 0; i--) {
=======
if (getBufferElement(buffer, start, true) != getPlaceHolder(start)) {
for (var i = seekPrevious(end) ; i > start && i >= 0; i--) {
>>>>>>>
if (getBufferElement(buffer, start, true) != getPlaceholder(start)) {
for (var i = seekPrevious(end) ; i > start && i >= 0; i--) {
<<<<<<<
setPlaceholder(j);
} else break;
=======
setReTargetPlaceHolder(buffer, j);
} //else break;
>>>>>>>
setPlaceholder(j);
} //else break;
<<<<<<<
Version: 2.6.0
=======
Version: 2.4.11
>>>>>>>
Version: 2.6.0
<<<<<<<
Version: 2.6.0
=======
Version: 2.4.11
>>>>>>>
Version: 2.6.0
<<<<<<<
Version: 2.6.0
=======
Version: 2.4.11
>>>>>>>
Version: 2.6.0
<<<<<<<
Version: 2.6.0
=======
Version: 2.4.11
>>>>>>>
Version: 2.6.0
<<<<<<<
Version: 2.6.0
=======
Version: 2.4.11
>>>>>>>
Version: 2.6.0 |
<<<<<<<
formatDate,
bnMultiplyByFraction,
getTxFeeBn,
shortenBalance,
getContractAtAddress,
=======
exportAsFile: exportAsFile,
>>>>>>>
formatDate,
bnMultiplyByFraction,
getTxFeeBn,
shortenBalance,
getContractAtAddress,
exportAsFile: exportAsFile,
<<<<<<<
}
function bnMultiplyByFraction (targetBN, numerator, denominator) {
const numBN = new ethUtil.BN(numerator)
const denomBN = new ethUtil.BN(denominator)
return targetBN.mul(numBN).div(denomBN)
}
function getTxFeeBn (gas, gasPrice = MIN_GAS_PRICE_BN.toString(16), blockGasLimit) {
const gasBn = hexToBn(gas)
const gasPriceBn = hexToBn(gasPrice)
const txFeeBn = gasBn.mul(gasPriceBn)
return txFeeBn.toString(16)
}
function getContractAtAddress (tokenAddress) {
return global.eth.contract(abi).at(tokenAddress)
=======
}
function exportAsFile (filename, data) {
// source: https://stackoverflow.com/a/33542499 by Ludovic Feltz
const blob = new Blob([data], {type: 'text/csv'})
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveBlob(blob, filename)
} else {
const elem = window.document.createElement('a')
elem.href = window.URL.createObjectURL(blob)
elem.download = filename
document.body.appendChild(elem)
elem.click()
document.body.removeChild(elem)
}
>>>>>>>
}
function bnMultiplyByFraction (targetBN, numerator, denominator) {
const numBN = new ethUtil.BN(numerator)
const denomBN = new ethUtil.BN(denominator)
return targetBN.mul(numBN).div(denomBN)
}
function getTxFeeBn (gas, gasPrice = MIN_GAS_PRICE_BN.toString(16), blockGasLimit) {
const gasBn = hexToBn(gas)
const gasPriceBn = hexToBn(gasPrice)
const txFeeBn = gasBn.mul(gasPriceBn)
return txFeeBn.toString(16)
}
function getContractAtAddress (tokenAddress) {
return global.eth.contract(abi).at(tokenAddress)
}
function exportAsFile (filename, data) {
// source: https://stackoverflow.com/a/33542499 by Ludovic Feltz
const blob = new Blob([data], {type: 'text/csv'})
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveBlob(blob, filename)
} else {
const elem = window.document.createElement('a')
elem.href = window.URL.createObjectURL(blob)
elem.download = filename
document.body.appendChild(elem)
elem.click()
document.body.removeChild(elem)
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
pasteEvent = isInputEventSupported('paste') && !msie10 ? 'paste' : isInputEventSupported('input') ? 'input' : "propertychange";
=======
pasteEvent = isInputEventSupported('paste') && !msie10 ? 'paste' : isInputEventSupported('input') ? 'input' : "propertychange";
>>>>>>>
pasteEvent = isInputEventSupported('paste') && !msie10 ? 'paste' : isInputEventSupported('input') ? 'input' : "propertychange";
<<<<<<<
return getActiveTests(position).fn != null ?
getActiveTests(position).fn.test(chrs, buffer, position, strict, opts)
: (c == getPlaceholder(position) || c == opts.skipOptionalPartCharacter) ?
{ "refresh": true, c: getPlaceholder(position), pos: position }
=======
return activeMaskset['tests'][testPos].fn != null ?
activeMaskset['tests'][testPos].fn.test(chrs, buffer, position, strict, opts)
: (c == getBufferElement(activeMaskset['_buffer'], position, true) || c == opts.skipOptionalPartCharacter) ?
{ "refresh": true, c: getBufferElement(activeMaskset['_buffer'], position, true), pos: position }
>>>>>>>
return getActiveTests(position).fn != null ?
getActiveTests(position).fn.test(chrs, buffer, position, strict, opts)
: (c == getPlaceholder(position) || c == opts.skipOptionalPartCharacter) ?
{ "refresh": true, c: getPlaceholder(position), pos: position }
<<<<<<<
=======
function determineTestPosition(pos) {
return pos % getActiveTests().length;
}
>>>>>>>
<<<<<<<
//functionality fn
this.unmaskedvalue = function ($input, skipDatepickerCheck) {
isRTL = $input.data('_inputmask')['isRTL'];
return unmaskedvalue($input, skipDatepickerCheck);
};
=======
>>>>>>> |
<<<<<<<
/* cec stuff */
initCec();
=======
///* cec stuff */
//const cec = require('./cec/cec.js');
//// create the cec event
//const EventEmitter = require('events').EventEmitter;
//var cecEmitter = new EventEmitter();
//cecEmitter.on('receive-cmd', function(cmd) {
// console.log('cec command received: ' + cmd + '\n');
//});
//cec.init({cecEmitter: cecEmitter});
//new BrowserWindow({
// transparent: false,
// frame: false,
// resizable: false,
// minWidth: 720,
// minHeight: 480,
// //alwaysOnTop: true,
// //show: false,
// backgroundColor: '#000000',
// skipTaskbar: true,
// closable: false
//}).show();
>>>>>>>
/* cec stuff */
initCec();
///* cec stuff */
//const cec = require('./cec/cec.js');
//// create the cec event
//const EventEmitter = require('events').EventEmitter;
//var cecEmitter = new EventEmitter();
//cecEmitter.on('receive-cmd', function(cmd) {
// console.log('cec command received: ' + cmd + '\n');
//});
//cec.init({cecEmitter: cecEmitter});
//new BrowserWindow({
// transparent: false,
// frame: false,
// resizable: false,
// minWidth: 720,
// minHeight: 480,
// //alwaysOnTop: true,
// //show: false,
// backgroundColor: '#000000',
// skipTaskbar: true,
// closable: false
//}).show(); |
<<<<<<<
import {
rudexAPIs,
widechainAPIs,
openledgerAPIs,
cryptoBridgeAPIs
} from "api/apiConfig";
=======
import {rudexAPIs, widechainAPIs, openledgerAPIs, cryptoBridgeAPIs, gdex2APIs} from "api/apiConfig";
>>>>>>>
import {
rudexAPIs,
widechainAPIs,
openledgerAPIs,
cryptoBridgeAPIs,
gdex2APIs
} from "api/apiConfig";
<<<<<<<
}
=======
},
},
GDEX: {
id: "GDEX",
name: "GDEX",
baseAPI: gdex2APIs,
isEnabled: true,
options: {
enabled: false,
selected: false
}
>>>>>>>
}
},
GDEX: {
id: "GDEX",
name: "GDEX",
baseAPI: gdex2APIs,
isEnabled: true,
options: {
enabled: false,
selected: false
} |
<<<<<<<
connection: "wss://bitshares.openledger.info/ws"
=======
connection: "wss://bitshares.openledger.info/ws"
});
this.viewSettings = Immutable.Map({
cardView: true
>>>>>>>
connection: "wss://bitshares.openledger.info/ws"
});
this.viewSettings = Immutable.Map({
cardView: false
<<<<<<<
"wss://bitshares.openledger.info/ws",
"ws://127.0.0.1:8091"
=======
"wss://bitshares.openledger.info/ws",
"ws://127.0.0.1:8090"
>>>>>>>
"ws://127.0.0.1:8090" |
<<<<<<<
["CNY", "RUDEX.GOLOS"],
["CNY", "RUDEX.GBG"],
["CNY", "RUDEX.BTC"],
["CNY", "RUDEX.EOS"],
=======
["CNY", "GDEX.SEER"],
["CNY", "GDEX.BKBT"],
["CNY", "GDEX.USDT"],
["CNY", "GDEX.GXC"],
>>>>>>>
["CNY", "GDEX.SEER"],
["CNY", "GDEX.BKBT"],
["CNY", "GDEX.USDT"],
["CNY", "GDEX.GXC"],
["CNY", "RUDEX.GOLOS"],
["CNY", "RUDEX.GBG"],
["CNY", "RUDEX.BTC"],
["CNY", "RUDEX.EOS"],
<<<<<<<
["HEMPSWEET", "OPEN.BTC"],
["KAPITAL", "BTS"],
["RUBLE", "RUDEX.GOLOS"],
["RUBLE", "RUDEX.GBG"],
=======
>>>>>>>
["RUB", "RUDEX.GOLOS"],
["RUB", "RUDEX.GBG"], |
<<<<<<<
// sidebar
this.renderSidebar(),
// network dropdown
h(NetworkDropdown, {
provider: this.props.provider,
frequentRpcList: this.props.frequentRpcList,
}, []),
h(AccountMenu),
(isLoading || isLoadingNetwork) && h(Loading, {
loadingMessage: loadMessage,
}),
=======
this.renderLoadingIndicator({ isLoading, isLoadingNetwork, loadMessage }),
>>>>>>>
// sidebar
this.renderSidebar(),
// network dropdown
h(NetworkDropdown, {
provider: this.props.provider,
frequentRpcList: this.props.frequentRpcList,
}, []),
h(AccountMenu),
(isLoading || isLoadingNetwork) && h(Loading, {
loadingMessage: loadMessage,
}),
// this.renderLoadingIndicator({ isLoading, isLoadingNetwork, loadMessage }),
<<<<<<<
=======
const props = this.props
const state = this.state || {}
const isNetworkMenuOpen = state.isNetworkMenuOpen || false
const {isMascara, isOnboarding} = props
// Do not render header if user is in mascara onboarding
if (isMascara && isOnboarding) {
return null
}
// Do not render header if user is in mascara buy ether
if (isMascara && props.currentView.name === 'buyEth') {
return null
}
>>>>>>>
const props = this.props
const state = this.state || {}
const isNetworkMenuOpen = state.isNetworkMenuOpen || false
const {isMascara, isOnboarding} = props
// Do not render header if user is in mascara onboarding
if (isMascara && isOnboarding) {
return null
}
// Do not render header if user is in mascara buy ether
if (isMascara && props.currentView.name === 'buyEth') {
return null
}
<<<<<<<
=======
case 'onboardingBuyEth':
log.debug('rendering onboarding buy ether screen')
return h(MascaraBuyEtherScreen, {key: 'buyEthView'})
case 'qr':
log.debug('rendering show qr screen')
return h('div', {
style: {
position: 'absolute',
height: '100%',
top: '0px',
left: '0px',
},
}, [
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer.color-orange', {
onClick: () => props.dispatch(actions.backToAccountDetail(props.activeAddress)),
style: {
marginLeft: '10px',
marginTop: '50px',
},
}),
h('div', {
style: {
position: 'absolute',
left: '44px',
width: '285px',
},
}, [
h(QrView, {key: 'qr'}),
]),
])
>>>>>>>
case 'onboardingBuyEth':
log.debug('rendering onboarding buy ether screen')
return h(MascaraBuyEtherScreen, {key: 'buyEthView'})
case 'qr':
log.debug('rendering show qr screen')
return h('div', {
style: {
position: 'absolute',
height: '100%',
top: '0px',
left: '0px',
},
}, [
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer.color-orange', {
onClick: () => props.dispatch(actions.backToAccountDetail(props.activeAddress)),
style: {
marginLeft: '10px',
marginTop: '50px',
},
}),
h('div', {
style: {
position: 'absolute',
left: '44px',
width: '285px',
},
}, [
h(QrView, {key: 'qr'}),
]),
]) |
<<<<<<<
var si = seneca()
assert.equal(si.version,'0.5.15')
=======
var si = seneca(testopts)
assert.equal(si.version,'0.5.14')
>>>>>>>
var si = seneca()
assert.equal(si.version,'0.5.15')
<<<<<<<
it('fire-and-forget', function() {
var si = seneca()
si.add({a:1},function(args,done){done(null,args.a+1)})
si.add({a:1,b:2},function(args,done){done(null,args.a+args.b)})
si.act({a:1})
si.act({a:1,b:2})
si.act('a:1')
si.act('a:1, b:2')
si.act('a:1',{b:2})
si.act('b:2',{a:1})
si.act('',{a:1})
si.act('',{a:1,b:2})
})
=======
>>>>>>>
it('fire-and-forget', function() {
var si = seneca()
si.add({a:1},function(args,done){done(null,args.a+1)})
si.add({a:1,b:2},function(args,done){done(null,args.a+args.b)})
si.act({a:1})
si.act({a:1,b:2})
si.act('a:1')
si.act('a:1, b:2')
si.act('a:1',{b:2})
si.act('b:2',{a:1})
si.act('',{a:1})
si.act('',{a:1,b:2})
})
<<<<<<<
// strargs win!!
si.act('a:1,b:2',{a:2},function(err,out){ assert.isNull(err); assert.equal(2,out) })
=======
try {
si.add('a:,b:2',function(args,done){done()})
}
catch( e ) {
assert.equal(e.seneca.code,'add_string_pattern_syntax')
}
>>>>>>>
// strargs win!!
si.act('a:1,b:2',{a:2},function(err,out){ assert.isNull(err); assert.equal(2,out) })
try {
si.add('a:,b:2',function(args,done){done()})
}
catch( e ) {
assert.equal(e.seneca.code,'add_string_pattern_syntax')
} |
<<<<<<<
si.act({id$:'a/B',a:1},function(err,out){
if(err) return fin(err);
=======
si.act({actid$:'a',a:1},function(err,out){
if(err) return done(err);
>>>>>>>
si.act({id$:'a/B',a:1},function(err,out){
if(err) return done(err);
<<<<<<<
si.act({id$:'a/B',a:1},function(err,out){
if(err) return fin(err);
=======
si.act({actid$:'a',a:1},function(err,out){
if(err) return done(err);
>>>>>>>
si.act({id$:'a/B',a:1},function(err,out){
if(err) return done(err); |
<<<<<<<
// ### seneca.add
// Add an message pattern and action function.
//
// `seneca.add( pattern, action )`
//
// * _pattern_ (object or string) → pattern definition
// * _action_ (function) → function executed when input to `seneca.act` matches pattern
//
// `seneca.add( pattern_string, pattern_object, action )`
//
// * _pattern_string_ (string) → pattern definition as jsonic string
// * _pattern_object_ (object) → pattern definition as object
// * _action_ (function) → function executed when input to `seneca.act` matches pattern.
//
// The pattern is defined by the top level properties of the _pattern_ parameter.
// In the case where the pattern is a string, it is first parsed by [jsonic](https://github.com/rjrodger/jsonic)
//
// If the value of a pattern property is a sub-object, this is interpreted as a
// [parambulator](https://github.com/rjrodger/parambulator) validation check. In this case, the property
// is not considered part of the pattern, but rather an argument to validate when _seneca.act_ is called.
self.add = api_add
self.logroute = api_logroute
self.err = api_err
self.register = api_register
self.depends = api_depends
self.export = api_export
self.fail = api_fail
self.make = api_make
self.make$ = api_make
self.listen = api_listen
self.client = api_client
self.cluster = api_cluster
self.hasplugin = api_hasplugin
self.findplugin = api_findplugin
self.pin = api_pin
self.findact = api_findact
self.hasact = api_hasact
self.actroutes = api_actroutes
self.list = api_list
self.act = api_act
self.act_if = api_act_if
self.wrap = api_wrap
self.close = api_close
self.ready = api_ready
self.use = api_use
self.seneca = api_seneca
self.fix = api_fix
self.delegate = api_delegate
self.toString = api_toString
=======
self.toString = function(){
return 'Seneca/'+self.version+'/'+self.id
}
// say hello, printing identifier to log
if( !opts.test.silent ) {
self.log.info('hello',self.toString())
}
>>>>>>>
// ### seneca.add
// Add an message pattern and action function.
//
// `seneca.add( pattern, action )`
//
// * _pattern_ (object or string) → pattern definition
// * _action_ (function) → function executed when input to `seneca.act` matches pattern
//
// `seneca.add( pattern_string, pattern_object, action )`
//
// * _pattern_string_ (string) → pattern definition as jsonic string
// * _pattern_object_ (object) → pattern definition as object
// * _action_ (function) → function executed when input to `seneca.act` matches pattern.
//
// The pattern is defined by the top level properties of the _pattern_ parameter.
// In the case where the pattern is a string, it is first parsed by [jsonic](https://github.com/rjrodger/jsonic)
//
// If the value of a pattern property is a sub-object, this is interpreted as a
// [parambulator](https://github.com/rjrodger/parambulator) validation check. In this case, the property
// is not considered part of the pattern, but rather an argument to validate when _seneca.act_ is called.
self.add = api_add
self.logroute = api_logroute
self.err = api_err
self.register = api_register
self.depends = api_depends
self.export = api_export
self.make = api_make
self.make$ = api_make
self.listen = api_listen
self.client = api_client
self.cluster = api_cluster
self.hasplugin = api_hasplugin
self.findplugin = api_findplugin
self.pin = api_pin
self.findact = api_findact
self.hasact = api_hasact
self.actroutes = api_actroutes
self.list = api_list
self.act = api_act
self.act_if = api_act_if
self.wrap = api_wrap
self.close = api_close
self.ready = api_ready
self.use = api_use
self.seneca = api_seneca
self.fix = api_fix
self.delegate = api_delegate
self.toString = api_toString
self.fail = makefail.call(self,{type:'sys',plugin:'seneca',tag:self.version,id:self.id})
// say hello, printing identifier to log
if( !opts.test.silent ) {
self.log.info('hello',self.toString())
}
<<<<<<<
var paramcheck = {}
// errfn = required, function; winfn = required, function or boolean, if false, no call
function api_err( errfn, winfn ) {
if( !_.isFunction(errfn) ) throw self.fail({code:'seneca/error_handler_no_err_function'})
if( !_.isFunction(winfn) && !_.isBoolean(winfn)) throw self.fail({code:'seneca/error_handler_no_win_function'})
return function(err) {
if( err ) {
return errfn(err)
}
else {
if( _.isFunction(winfn) ) {
winfn.apply(null,arrayify(arguments,1))
}
}
}
}
=======
>>>>>>>
// errfn = required, function; winfn = required, function or boolean, if false, no call
function api_err( errfn, winfn ) {
if( !_.isFunction(errfn) ) throw self.fail({code:'seneca/error_handler_no_err_function'})
if( !_.isFunction(winfn) && !_.isBoolean(winfn)) throw self.fail({code:'seneca/error_handler_no_win_function'})
return function(err) {
if( err ) {
return errfn(err)
}
else {
if( _.isFunction(winfn) ) {
winfn.apply(null,arrayify(arguments,1))
}
}
}
}
<<<<<<<
paramcheck.register = parambulator(
{type$:'object',required$:['name','init'],string$:['name'],function$:['init','service'],object$:['opts']},
{topname:'plugin',msgprefix:'register(plugin): ',callbackmaker:paramerr('seneca/register_invalid_plugin')}
)
function api_register( plugin, cbfunc ) {
=======
self.register = function( plugin, cbfunc ) {
>>>>>>>
paramcheck.register = parambulator(
{type$:'object',required$:['name','init'],string$:['name'],function$:['init','service'],object$:['opts']},
{topname:'plugin',msgprefix:'register(plugin): ',callbackmaker:paramerr('seneca/register_invalid_plugin')}
)
function api_register( plugin, cbfunc ) {
<<<<<<<
self.fail({code:'seneca/plugin_required',plugin:args.pluginname,dependency:depname})
=======
self.die('plugin_required',{name:plugin,dependency:depname})
return false
>>>>>>>
self.die('plugin_required',{name:args.pluginname,dependency:depname})
return false
<<<<<<<
if( util.isError(meta) ) {
if( (out = checkrethrow(meta)) ) return out;
err = meta
}
=======
>>>>>>>
<<<<<<<
else if( util.isError(meta) ) {
code = meta.code || 'unknown'
msg = meta.message
error = meta
argI = 2
why = 'error'
=======
var error = _.isError(first) ? first : _.isError(args[1]) ? (valstart=2,first) : null
var valmap = _.isObject(args[valstart]) ? args[valstart] : {}
var message = (opts.message[ctxt.plugin] && opts.message[ctxt.plugin][code])
message = _.isString(message) ? message : (_.isString(valmap.message) && valmap.message)
message = _.isString(message) ? message : (error && _.isString(error.message) && error.message)
message = _.isString(message) ? message : code
// workaround to prevent underscore blowing up if properties are not found
// reserved words and undefined need to be suffixed with $ in the template interpolates
var valstrmap = {}
_.each(valmap,function(val,key){
try { eval('var '+key+';') } catch(e) { key = key+'$' }
if( {'undefined':1,'NaN':1}[key] ) { key = key+'$' }
valstrmap[key] = (_.isObject(val) ? common.owndesc(val,1) : ''+val)
})
var done = false
while( !done ) {
try {
message = _.template( message, valstrmap )
done = true
}
catch(e) {
if(e instanceof ReferenceError) {
var m = /ReferenceError:\s+(.*?)\s+/.exec(e.toString())
if( m && m[1] ) {
valstrmap[m[1]]="["+m[1]+"?]"
}
else done = true
}
else {
done = true
message = message+' VALUES:'+common.owndesc(valmap,2)
}
}
>>>>>>>
var error = util.isError(first) ? first : util.isError(args[1]) ? (valstart=2,first) : null
var valmap = _.isObject(args[valstart]) ? args[valstart] : {}
var message = (opts.message[ctxt.plugin] && opts.message[ctxt.plugin][code])
message = _.isString(message) ? message : (_.isString(valmap.message) && valmap.message)
message = _.isString(message) ? message : (error && _.isString(error.message) && error.message)
message = _.isString(message) ? message : code
// workaround to prevent underscore blowing up if properties are not found
// reserved words and undefined need to be suffixed with $ in the template interpolates
var valstrmap = {}
_.each(valmap,function(val,key){
try { eval('var '+key+';') } catch(e) { key = key+'$' }
if( {'undefined':1,'NaN':1}[key] ) { key = key+'$' }
valstrmap[key] = (_.isObject(val) ? common.owndesc(val,1) : ''+val)
})
var done = false
while( !done ) {
try {
message = _.template( message, valstrmap )
done = true
}
catch(e) {
if(e instanceof ReferenceError) {
var m = /ReferenceError:\s+(.*?)\s+/.exec(e.toString())
if( m && m[1] ) {
valstrmap[m[1]]="["+m[1]+"?]"
}
else done = true
}
else {
done = true
message = message+' VALUES:'+common.owndesc(valmap,2)
}
}
<<<<<<<
else if( _.isObject(meta) ) {
if( meta.error && util.isError(meta.error) ) {
if( (out = checkrethrow(meta)) ) return out;
err = meta.error
=======
}
function makedie( ctxt ) {
var instance = this
ctxt = _.extend(ctxt,instance.die?instance.die.context:{})
var die = function() {
var self = this
var args = handle_error_args(arguments,ctxt)
var code = args.code
var error = args.error
var message = args.message
// stayalive is only for testing, do not use in production
var stayalive = opts.test.stayalive || (error && error.stayalive)
if( !error ) {
error = new Error(code)
>>>>>>>
}
function makedie( ctxt ) {
var instance = this
ctxt = _.extend(ctxt,instance.die?instance.die.context:{})
var die = function() {
var self = this
var args = handle_error_args(arguments,ctxt)
var code = args.code
var error = args.error
var message = args.message
// stayalive is only for testing, do not use in production
var stayalive = opts.test.stayalive || (error && error.stayalive)
if( !error ) {
error = new Error(code)
<<<<<<<
function api_wrap(pin,wrapper) {
//self.wrap = function(pin,wrapper){
=======
self.wrap = function(pin,wrapper){
>>>>>>>
function api_wrap(pin,wrapper) { |
<<<<<<<
$scope.set = function () {
$location.hash($scope.expr);
};
}]);
=======
}]);
tsafControllers.controller('GraphCtrl', [
'$scope', '$http', function ($scope, $http) {
//Might be better to get these from OpenTSDB's Aggregator API
$scope.aggregators = ["sum", "min", "max", "avg", "dev", "zimsum", "mimmin", "minmax"];
$scope.dsaggregators = ["", "sum", "min", "max", "avg", "dev", "zimsum", "mimmin", "minmax"];
$scope.ds = "";
$scope.aggregator = "sum";
$scope.rate = "false";
$scope.start = "1h-ago";
$http.get('/api/metric').success(function (data) {
$scope.metrics = data;
}).error(function (error) {
$scope.error = 'Unable to fetch metrics: ' + error;
});
$scope.GetTagKByMetric = function () {
$scope.tagset = {};
$scope.tagvs = {};
$http.get('/api/tagk/' + $scope.metric).success(function (data) {
if (data instanceof Array) {
for (var i = 0; i < data.length; i++) {
$scope.tagset[data[i]] = "";
GetTagVs(data[i]);
}
}
}).error(function (error) {
$scope.error = 'Unable to fetch metrics: ' + error;
});
};
function TagsAsQS(ts) {
var qts = new Array();
for (var key in $scope.tagset) {
if ($scope.tagset.hasOwnProperty(key)) {
if ($scope.tagset[key] != "") {
qts.push(key);
qts.push($scope.tagset[key]);
}
}
}
return qts.join();
}
function MakeParam(k, v) {
if (v) {
return encodeURIComponent(k) + "=" + encodeURIComponent(v) + "&";
}
return "";
}
function GetTagVs(k) {
$http.get('/api/tagv/' + k + '/' + $scope.metric).success(function (data) {
$scope.tagvs[k] = data;
}).error(function (error) {
$scope.error = 'Unable to fetch metrics: ' + error;
});
}
$scope.MakeQuery = function () {
var qs = "";
qs += MakeParam("start", $scope.start);
qs += MakeParam("end", $scope.end);
qs += MakeParam("aggregator", $scope.aggregator);
qs += MakeParam("metric", $scope.metric);
qs += MakeParam("rate", $scope.rate);
qs += MakeParam("tags", TagsAsQS($scope.tagset));
if ($scope.ds && $scope.dstime) {
qs += MakeParam("downsample", $scope.dstime + '-' + $scope.ds);
}
$scope.query = qs;
$scope.running = $scope.query;
$http.get('/api/query?' + $scope.query).success(function (data) {
$scope.result = data.table;
$scope.running = '';
}).error(function (error) {
$scope.error = error;
$scope.running = '';
});
};
}]);
tsafApp.directive("googleChart", function () {
return {
restrict: "A",
link: function (scope, elem, attrs) {
var chart = new google.visualization.LineChart(elem[0]);
scope.$watch(attrs.ngModel, function (v, old_v) {
if (v != old_v) {
var dt = new google.visualization.DataTable(v);
chart.draw(dt, null);
}
});
}
};
});
>>>>>>>
$scope.set = function () {
$location.hash($scope.expr);
};
}]);
tsafControllers.controller('GraphCtrl', [
'$scope', '$http', function ($scope, $http) {
//Might be better to get these from OpenTSDB's Aggregator API
$scope.aggregators = ["sum", "min", "max", "avg", "dev", "zimsum", "mimmin", "minmax"];
$scope.dsaggregators = ["", "sum", "min", "max", "avg", "dev", "zimsum", "mimmin", "minmax"];
$scope.ds = "";
$scope.aggregator = "sum";
$scope.rate = "false";
$scope.start = "1h-ago";
$http.get('/api/metric').success(function (data) {
$scope.metrics = data;
}).error(function (error) {
$scope.error = 'Unable to fetch metrics: ' + error;
});
$scope.GetTagKByMetric = function () {
$scope.tagset = {};
$scope.tagvs = {};
$http.get('/api/tagk/' + $scope.metric).success(function (data) {
if (data instanceof Array) {
for (var i = 0; i < data.length; i++) {
$scope.tagset[data[i]] = "";
GetTagVs(data[i]);
}
}
}).error(function (error) {
$scope.error = 'Unable to fetch metrics: ' + error;
});
};
function TagsAsQS(ts) {
var qts = new Array();
for (var key in $scope.tagset) {
if ($scope.tagset.hasOwnProperty(key)) {
if ($scope.tagset[key] != "") {
qts.push(key);
qts.push($scope.tagset[key]);
}
}
}
return qts.join();
}
function MakeParam(k, v) {
if (v) {
return encodeURIComponent(k) + "=" + encodeURIComponent(v) + "&";
}
return "";
}
function GetTagVs(k) {
$http.get('/api/tagv/' + k + '/' + $scope.metric).success(function (data) {
$scope.tagvs[k] = data;
}).error(function (error) {
$scope.error = 'Unable to fetch metrics: ' + error;
});
}
$scope.MakeQuery = function () {
var qs = "";
qs += MakeParam("start", $scope.start);
qs += MakeParam("end", $scope.end);
qs += MakeParam("aggregator", $scope.aggregator);
qs += MakeParam("metric", $scope.metric);
qs += MakeParam("rate", $scope.rate);
qs += MakeParam("tags", TagsAsQS($scope.tagset));
if ($scope.ds && $scope.dstime) {
qs += MakeParam("downsample", $scope.dstime + '-' + $scope.ds);
}
$scope.query = qs;
$scope.running = $scope.query;
$http.get('/api/query?' + $scope.query).success(function (data) {
$scope.result = data.table;
$scope.running = '';
}).error(function (error) {
$scope.error = error;
$scope.running = '';
});
};
}]);
tsafApp.directive("googleChart", function () {
return {
restrict: "A",
link: function (scope, elem, attrs) {
var chart = new google.visualization.LineChart(elem[0]);
scope.$watch(attrs.ngModel, function (v, old_v) {
if (v != old_v) {
var dt = new google.visualization.DataTable(v);
chart.draw(dt, null);
}
});
}
};
}); |
<<<<<<<
this.Given(/^I have declared an image dependency in an html file with revision tokens$/, function (callback) {
this.indexFile = new File({
cwd: 'test/fixtures/',
base: 'test/fixtures/static',
path: 'test/fixtures/static/image-element-post-class.html',
contents: new Buffer(this.htmlFileContents('image-element-post-class'))
});
callback();
});
=======
this.Given(/^I have declared dependencies in an html file with revision tokens$/, function (callback) {
this.indexFile = new File({
cwd: 'test/fixtures/',
base: 'test/fixtures/static',
path: 'test/fixtures/static/multiple-index.html',
contents: new Buffer(this.htmlFileContents('multiple-index'))
});
callback();
});
>>>>>>>
this.Given(/^I have declared dependencies in an html file with revision tokens$/, function (callback) {
this.indexFile = new File({
cwd: 'test/fixtures/',
base: 'test/fixtures/static',
path: 'test/fixtures/static/multiple-index.html',
contents: new Buffer(this.htmlFileContents('multiple-index'))
});
callback();
});
this.Given(/^I have declared an image dependency in an html file with revision tokens$/, function (callback) {
this.indexFile = new File({
cwd: 'test/fixtures/',
base: 'test/fixtures/static',
path: 'test/fixtures/static/image-element-post-class.html',
contents: new Buffer(this.htmlFileContents('image-element-post-class'))
});
callback();
});
<<<<<<<
this.Then(/^The attributes following the revision tokens are preserved$/, function (callback) {
var $ = cheerio.load(result);
var classDeclaration = $('img').attr('class');
expect(classDeclaration).to.not.be.undefined;
expect(classDeclaration).to.equal('pull-right company-logo media-object');
callback();
});
=======
>>>>>>>
this.Then(/^The attributes following the revision tokens are preserved$/, function (callback) {
var $ = cheerio.load(result);
var classDeclaration = $('img').attr('class');
expect(classDeclaration).to.not.be.undefined;
expect(classDeclaration).to.equal('pull-right company-logo media-object');
callback();
}); |
<<<<<<<
value = axelor.$eval(scope, expr, withContext(scope, rec));
} catch (e) {
console.error('FAILED:', condition, e);
}
=======
value = !!axelor.$eval(scope, expr, withContext(scope, rec));
} catch (e) {}
>>>>>>>
value = !!axelor.$eval(scope, expr, withContext(scope, rec));
} catch (e) {
console.error('FAILED:', condition, e);
} |
<<<<<<<
const connect = require('../../metamask-connect')
const { withRouter } = require('react-router-dom')
const { compose } = require('recompose')
=======
const PropTypes = require('prop-types')
const connect = require('react-redux').connect
>>>>>>>
const { withRouter } = require('react-router-dom')
const { compose } = require('recompose')
const PropTypes = require('prop-types')
const connect = require('react-redux').connect
<<<<<<<
module.exports = compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(ConfirmSendEther)
=======
ConfirmSendEther.contextTypes = {
t: PropTypes.func,
}
module.exports = connect(mapStateToProps, mapDispatchToProps)(ConfirmSendEther)
>>>>>>>
ConfirmSendEther.contextTypes = {
t: PropTypes.func,
}
module.exports = compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(ConfirmSendEther) |
<<<<<<<
if (scope.$parent.isLink) {
scope.onEdit = function () {
var value = scope.getValue() || {};
scope.openTab({
action: _.uniqueId('$act'),
model: scope._model,
viewType: "form",
views: [{ type: "form" }]
}, {
mode: "edit",
state: value.id
});
};
}
=======
scope.setDomain(data.domain, data.context);
>>>>>>>
scope.setDomain(data.domain, data.context);
if (scope.$parent.isLink) {
scope.onEdit = function () {
var value = scope.getValue() || {};
scope.openTab({
action: _.uniqueId('$act'),
model: scope._model,
viewType: "form",
views: [{ type: "form" }]
}, {
mode: "edit",
state: value.id
});
};
} |
<<<<<<<
['u_matrix', 'u_exmatrix', 'u_texture', 'u_texsize', 'u_color', 'u_gamma', 'u_buffer', 'u_zoom', 'u_fadedist', 'u_minfadezoom', 'u_maxfadezoom', 'u_fadezoom']);
=======
['u_matrix', 'u_exmatrix', 'u_texture', 'u_texsize', 'u_color', 'u_gamma', 'u_buffer', 'u_angle', 'u_zoom', 'u_flip', 'u_fadedist', 'u_minfadezoom', 'u_maxfadezoom', 'u_fadezoom', 'u_skewed', 'u_extra']);
>>>>>>>
['u_matrix', 'u_exmatrix', 'u_texture', 'u_texsize', 'u_color', 'u_gamma', 'u_buffer', 'u_zoom', 'u_fadedist', 'u_minfadezoom', 'u_maxfadezoom', 'u_fadezoom', 'u_skewed', 'u_extra']);
<<<<<<<
['u_matrix', 'u_exmatrix', 'u_texture', 'u_texsize', 'u_zoom', 'u_fadedist', 'u_minfadezoom', 'u_maxfadezoom', 'u_fadezoom', 'u_opacity']);
=======
['u_matrix', 'u_exmatrix', 'u_texture', 'u_texsize', 'u_angle', 'u_zoom', 'u_flip', 'u_fadedist', 'u_minfadezoom', 'u_maxfadezoom', 'u_fadezoom', 'u_opacity', 'u_skewed', 'u_extra']);
>>>>>>>
['u_matrix', 'u_exmatrix', 'u_texture', 'u_texsize', 'u_zoom', 'u_fadedist', 'u_minfadezoom', 'u_maxfadezoom', 'u_fadezoom', 'u_opacity', 'u_skewed', 'u_extra']); |
<<<<<<<
h('div', {
className: classnames({
'confirm-screen-section-column--with-error': errors['insufficientFunds'],
'confirm-screen-section-column': !errors['insufficientFunds'],
}),
}, [
h('span.confirm-screen-label', [ t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]),
=======
h('div.confirm-screen-section-column', [
h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]),
>>>>>>>
h('div', {
className: classnames({
'confirm-screen-section-column--with-error': errors['insufficientFunds'],
'confirm-screen-section-column': !errors['insufficientFunds'],
}),
}, [
h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]),
h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]),
<<<<<<<
updateSendErrors({ invalidGasParams: t('invalidGasParams') })
=======
this.props.dispatch(actions.displayWarning(this.props.t('invalidGasParams')))
>>>>>>>
updateSendErrors({ invalidGasParams: this.props.t('invalidGasParams') }) |
<<<<<<<
this.requestId = (window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame)(this.render);
=======
frame(this.render);
>>>>>>>
this.requestId = frame(this.render); |
<<<<<<<
if (info['icon-image'] && this.sprite) {
imagePos = this.sprite[resolveTokens(feature, info['icon-image'])];
=======
if (info['point-image'] && this.sprite) {
imagePos = this.sprite[resolveTokens(feature.properties, info['point-image'])];
>>>>>>>
if (info['icon-image'] && this.sprite) {
imagePos = this.sprite[resolveTokens(feature.properties, info['icon-image'])]; |
<<<<<<<
var translate = type === 'text' ? layerStyle['text-translate'] :
type === 'fill' ? layerStyle['fill-translate'] :
type === 'line' ? layerStyle['line-translate'] :
type === 'icon' ? layerStyle['icon-translate'] : null;
var translatedMatrix;
if (translate) {
var tilePixelRatio = this.transform.scale / (1 << params.z) / 8;
var translation = [
translate[0] / tilePixelRatio,
translate[1] / tilePixelRatio,
0
];
translatedMatrix = new Float32Array(16);
mat4.translate(translatedMatrix, this.tile.posMatrix, translation);
}
var draw = type === 'symbol' ? drawSymbol :
type === 'fill' ? drawFill :
type === 'line' ? drawLine :
type === 'raster' ? drawRaster : null;
=======
var draw = info.type === 'symbol' ? drawSymbol :
info.type === 'fill' ? drawFill :
info.type === 'line' ? drawLine :
info.type === 'raster' ? drawRaster : null;
>>>>>>>
var draw = type === 'symbol' ? drawSymbol :
type === 'fill' ? drawFill :
type === 'line' ? drawLine :
type === 'raster' ? drawRaster : null; |
<<<<<<<
var dasharray = layerStyle['line-dasharray'];
var image = layerStyle['line-image'];
=======
var image = layer.paint['line-image'];
>>>>>>>
var dasharray = layer.paint['line-dasharray'];
var image = layer.paint['line-image'];
<<<<<<<
=======
gl.uniform2fv(shader.u_dasharray, layer.paint['line-dasharray']);
>>>>>>> |
<<<<<<<
Collision.prototype.place = function(boxes, anchor, horizontal, props) {
var padding = props['text-padding'];
var alwaysVisible = props['text-always-visible'];
var minPlacementScale = anchor.scale;
=======
Collision.prototype.place = function(boxes, anchor, minPlacementScale, maxPlacementScale,
padding, horizontal, allowOverlap, ignorePlacement) {
>>>>>>>
Collision.prototype.place = function(boxes, anchor, horizontal, props) {
var padding = props['text-padding'];
var allowOverlap = props['symbol-allow-overlap'];
var ignorePlacement = props['symbol-ignore-placement'];
var minPlacementScale = anchor.scale;
<<<<<<<
var scale = alwaysVisible ? minPlacementScale :
this.getPlacementScale(boxes, minPlacementScale, padding);
=======
var scale = allowOverlap ? minPlacementScale :
this.getPlacementScale(boxes, minPlacementScale, maxPlacementScale, padding);
>>>>>>>
var scale = allowOverlap ? minPlacementScale :
this.getPlacementScale(boxes, minPlacementScale, padding); |
<<<<<<<
this.keyringController.getState(),
this.txManager.getState()
=======
this.keyringController.getState(),
this.noticeController.getState()
>>>>>>>
this.keyringController.getState(),
this.txManager.getState()
this.noticeController.getState()
<<<<<<<
const txManager = this.txManager
=======
const noticeController = this.noticeController
>>>>>>>
const txManager = this.txManager
const noticeController = this.noticeController |
<<<<<<<
var xhr = ajax.getArrayBuffer(params.url, done.bind(this));
var tile = this.loading[source][id] = new WorkerTile(
params.id, params.zoom, params.maxZoom,
params.tileSize, params.source, params.overscaling, params.angle, xhr, params.collisionDebug);
function done(err, data) {
delete this.loading[source][id];
=======
this.loading[source][uid] = ajax.getArrayBuffer(params.url, function(err, data) {
delete this.loading[source][uid];
>>>>>>>
var tile = this.loading[source][uid] = new WorkerTile(params);
tile.xhr = ajax.getArrayBuffer(params.url, done.bind(this));
function done(err, data) {
delete this.loading[source][uid];
<<<<<<<
=======
var tile = new WorkerTile(params);
>>>>>>>
<<<<<<<
this.loaded[source][id] = tile;
}
=======
this.loaded[source][uid] = tile;
}.bind(this));
>>>>>>>
this.loaded[source][uid] = tile;
}
<<<<<<<
var source = this.loading[params.source];
if (source && source[params.id]) {
source[params.id].xhr.abort();
delete source[params.id];
=======
var loading = this.loading[params.source],
uid = params.uid;
if (loading && loading[uid]) {
loading[uid].abort();
delete loading[uid];
>>>>>>>
var loading = this.loading[params.source],
uid = params.uid;
if (loading && loading[uid]) {
loading[uid].xhr.abort();
delete loading[uid];
<<<<<<<
var tile = new WorkerTile(id, params.zoom, params.maxZoom, params.tileSize, source, params.overscaling, params.angle, undefined, params.collisionDebug);
=======
var tile = new WorkerTile(params);
>>>>>>>
var tile = new WorkerTile(params); |
<<<<<<<
this.glyphSource.getSimpleGlyphs(params.fontstack, params.codepoints, params.id, callback);
=======
this.glyphSource.getRects(params.fontstack, params.codepoints, params.uid, callback);
>>>>>>>
this.glyphSource.getSimpleGlyphs(params.fontstack, params.codepoints, params.uid, callback); |
<<<<<<<
this._setupStyle(config.style);
this._setupPainter();
this._setupContextHandler();
this._setupEvents();
this._setupDispatcher();
this._setupLabels();
=======
this.setupStyle(config.style);
this.setupPainter();
this.setupContextHandler();
this.setupEvents();
this.setupDispatcher();
>>>>>>>
this._setupStyle(config.style);
this._setupPainter();
this._setupContextHandler();
this._setupEvents();
this._setupDispatcher();
<<<<<<<
Map.prototype._setupLabels = function() {
pixelRatio = 1;
var font = '400 ' + (50 * pixelRatio) + 'px Helvetica Neue';
var texture = new LabelTexture(document.createElement('canvas'));
//console.log(_.reduce(_.keys(glyphs), function(ag, gl) { ag[gl.charCodeAt(0)] = gl;return ag }, {}))
//texture.renderGlyphs(_.keys(glyphs), '200 12px Helvetica Neue', false);
texture.renderGlyphs('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz .,()-ãéíç', font, false);
this.labelTexture = texture;
this.labelTexture.texturify(this.painter.gl);
};
Map.prototype._rerender = function() {
=======
Map.prototype.rerender = function() {
>>>>>>>
Map.prototype._rerender = function() { |
<<<<<<<
GLPainter.prototype.drawTile = function(tile, layers) {
this.setExtent(tile.tileExtent);
=======
Painter.prototype.drawTile = function(tile, layers) {
>>>>>>>
Painter.prototype.drawTile = function(tile, layers) {
this.setExtent(tile.tileExtent); |
<<<<<<<
function WorkerTile(id, zoom, maxZoom, tileSize, source, depth, angle, xhr) {
=======
function WorkerTile(id, zoom, maxZoom, tileSize, source, overscaling) {
>>>>>>>
function WorkerTile(id, zoom, maxZoom, tileSize, source, overscaling, angle, xhr) {
<<<<<<<
this.depth = depth;
this.angle = angle;
this.xhr = xhr;
this.status = 'loading';
=======
this.overscaling = overscaling;
>>>>>>>
this.overscaling = overscaling;
this.angle = angle;
this.xhr = xhr;
this.status = 'loading';
<<<<<<<
placement = this.placement = new Placement(this.zoom, 4096, this.tileSize),
=======
collision = new Collision(this.zoom, 4096, this.tileSize),
>>>>>>>
placement = this.placement = new Placement(this.zoom, 4096, this.tileSize),
<<<<<<<
bucket = createBucket(layer, buffers, placement, this.zoom);
=======
bucket = createBucket(layer, buffers, collision, this.zoom, this.overscaling);
>>>>>>>
bucket = createBucket(layer, buffers, placement, this.zoom, this.overscaling); |
<<<<<<<
actor.send('get icons', {
id: tile.id,
icons: icons
}, setIcons.bind(this));
=======
actor.send('get icons', {icons: icons}, function(err, newicons) {
if (err) return callback(err);
this.icons = newicons;
callback();
}.bind(this));
>>>>>>>
actor.send('get icons', { icons: icons }, setIcons.bind(this)); |
<<<<<<<
// ensure accountTracker updates balances after network change
this.networkController.on('networkDidChange', () => {
this.accountTracker._updateAccounts()
})
=======
// start and stop polling for balances based on activeControllerConnections
this.on('controllerConnectionChanged', (activeControllerConnections) => {
if (activeControllerConnections > 0) {
this.accountTracker.start()
} else {
this.accountTracker.stop()
}
})
>>>>>>>
// start and stop polling for balances based on activeControllerConnections
this.on('controllerConnectionChanged', (activeControllerConnections) => {
if (activeControllerConnections > 0) {
this.accountTracker.start()
} else {
this.accountTracker.stop()
}
})
// ensure accountTracker updates balances after network change
this.networkController.on('networkDidChange', () => {
this.accountTracker._updateAccounts()
}) |
<<<<<<<
drawLine(gl, painter, layerData, layerStyle, tile, stats, params, style.sprite);
=======
drawLine(gl, painter, layerData, layerStyle, tile, stats[layer.bucket], params);
>>>>>>>
drawLine(gl, painter, layerData, layerStyle, tile, stats[layer.bucket], params, style.sprite);
<<<<<<<
gl.vertexAttribPointer(painter.fillShader.a_pos, vertex.itemSize / 2, gl.SHORT, false, 0, 0);
gl.drawElements(gl.TRIANGLES, (end - begin) * 3, gl.UNSIGNED_SHORT, begin * 6);
=======
stats.triangles += (end - begin);
buffer++;
}
>>>>>>>
gl.vertexAttribPointer(painter.fillShader.a_pos, vertex.itemSize / 2, gl.SHORT, false, 0, 0);
gl.drawElements(gl.TRIANGLES, (end - begin) * 3, gl.UNSIGNED_SHORT, begin * 6);
stats.triangles += (end - begin);
<<<<<<<
begin = buffer == layer.fillBufferIndex ? layer.fillVertexIndex : 0;
end = buffer == layer.fillBufferIndexEnd ? layer.fillVertexIndexEnd : vertex.index;
gl.vertexAttribPointer(painter.outlineShader.a_pos, 2, gl.SHORT, false, 0, 0);
gl.drawArrays(gl.LINE_STRIP, begin, (end - begin));
buffer++;
}
=======
stats.lines += (end - begin);
buffer++;
>>>>>>>
begin = buffer == layer.fillBufferIndex ? layer.fillVertexIndex : 0;
end = buffer == layer.fillBufferIndexEnd ? layer.fillVertexIndexEnd : vertex.index;
gl.vertexAttribPointer(painter.outlineShader.a_pos, 2, gl.SHORT, false, 0, 0);
gl.drawArrays(gl.LINE_STRIP, begin, (end - begin));
stats.lines += (end - begin);
buffer++;
} |
<<<<<<<
const maybeMigrateSiteFormat = require('./migration');
=======
const walkSync = require('walk-sync');
const VERSION_PREFIX = 'v';
const { LATEST_VERSION_NAME } = require('../..');
>>>>>>>
const maybeMigrateSiteFormat = require('./migration');
const { LATEST_VERSION_NAME } = require('../..');
<<<<<<<
if (!fs.existsSync(`${stagingDirectory}/index.html`)) {
fs.copySync(`${vendorDir}/index.html`, `${stagingDirectory}/index.html`);
}
let segmentCount = this._getRootURL().split('/').length;
=======
let segmentCount = this._getRootURL().split('/').length;
>>>>>>>
let segmentCount = this._getRootURL().split('/').length;
<<<<<<<
let latestDir = '';
let fullPath = path.join(stagingDirectory, latestDir);
=======
>>>>>>>
let latestDir = '';
let fullPath = path.join(stagingDirectory, latestDir);
<<<<<<<
return filterDir(fullPath,
relativeName => ['versions', 'versions.json', '404.html'].includes(relativeName)
)
.then(() => fs.copy(context.distDir, fullPath))
.then(() => this._updateIndexContents(context, stagingDirectory, latestDir, deployVersion));
=======
let manifestPath = `${stagingDirectory}/root-deploy-files.json`;
let deletions = [];
if (fs.existsSync(manifestPath)) {
for (let file of fs.readJSONSync(manifestPath)) {
deletions.push(fs.remove(`${stagingDirectory}/${file}`));
}
}
return Promise.all(deletions)
.then(() => fs.writeJSON(manifestPath, walkSync(context.distDir, { directories: false })))
.then(() => fs.copy(context.distDir, stagingDirectory))
.then(() => this._updateIndexContents(context, stagingDirectory, '', deployVersion));
>>>>>>>
return filterDir(fullPath,
relativeName => ['versions', 'versions.json', '404.html'].includes(relativeName)
)
.then(() => fs.copy(context.distDir, fullPath))
.then(() => this._updateIndexContents(context, stagingDirectory, latestDir, deployVersion));
<<<<<<<
let curpath = '';
let name = 'latest';
=======
let path = '';
let name = LATEST_VERSION_NAME;
>>>>>>>
let curpath = '';
let name = 'LATEST_VERSION_NAME'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.