conflict_resolution
stringlengths
27
16k
<<<<<<< skin={InputSkin} ======= skin={<SimpleInputSkin />} onKeyPress={submitOnEnter.bind(this, this.submit)} >>>>>>> skin={InputSkin} onKeyPress={submitOnEnter.bind(this, this.submit)} <<<<<<< skin={InputSkin} ======= skin={<SimpleInputSkin />} onKeyPress={submitOnEnter.bind(this, this.submit)} >>>>>>> skin={InputSkin} onKeyPress={submitOnEnter.bind(this, this.submit)}
<<<<<<< await this.client.setValue('.AutocompleteOverrides_autocompleteWrapper input', word); await this.client.waitForVisible(`//li[text()="${word}"]`); await this.waitAndClick(`//li[text()="${word}"]`); await this.client.waitForVisible(`//span[text()="${word}"]`); ======= await this.client.setValue( '.AutocompleteOverrides_autocompleteWrapper input', word ); await this.client.waitForVisible(`//li[contains(text(), '${word}')]`); await this.waitAndClick(`//li[contains(text(), '${word}')]`); await this.client.waitForVisible(`//span[contains(text(), '${word}')]`); >>>>>>> await this.client.setValue( '.AutocompleteOverrides_autocompleteWrapper input', word ); await this.client.waitForVisible(`//li[text()="${word}"]`); await this.waitAndClick(`//li[text()="${word}"]`); await this.client.waitForVisible(`//span[text()="${word}"]`); <<<<<<< When(/^I click on recovery phrase mnemonics in correct order$/, async function () { for (let i = 0; i < this.recoveryPhrase.length; i++) { const word = this.recoveryPhrase[i]; const selector = 'MnemonicWord_root'; const disabledSelector = 'MnemonicWord_disabled'; await this.waitAndClick( `//button[contains(@class,'${selector}') and not(contains(@class, '${disabledSelector}')) and text()="${word}"]` ); ======= When( /^I click on recovery phrase mnemonics in correct order$/, async function() { for (let i = 0; i < this.recoveryPhrase.length; i++) { const text = this.recoveryPhrase[i]; const selector = 'MnemonicWord_root'; const disabledSelector = 'MnemonicWord_disabled'; await this.waitAndClick( `//button[contains(@class,'${selector}') and not(contains(@class, '${disabledSelector}')) and contains(text(), '${text}')]` ); } >>>>>>> When( /^I click on recovery phrase mnemonics in correct order$/, async function() { for (let i = 0; i < this.recoveryPhrase.length; i++) { const word = this.recoveryPhrase[i]; const selector = 'MnemonicWord_root'; const disabledSelector = 'MnemonicWord_disabled'; await this.waitAndClick( `//button[contains(@class,'${selector}') and not(contains(@class, '${disabledSelector}')) and text()="${word}"]` ); }
<<<<<<< _networkStatusPollingInterval: ?number = null; _forceCheckTimeDifferencePollingInterval: ?number = null; ======= _networkStatusPollingInterval: ?IntervalID = null; _systemTimeChangeCheckPollingInterval: ?IntervalID = null; >>>>>>> _networkStatusPollingInterval: ?IntervalID = null; _forceCheckTimeDifferencePollingInterval: ?IntervalID = null; <<<<<<< ======= this._updateLocalTimeDifferenceWhenSystemTimeChanged, this._updateNodeStatus, >>>>>>> this._updateNodeStatus, <<<<<<< _updateNetworkStatusWhenDisconnected = () => { if (!this.isConnected) this._updateNetworkStatus(); ======= // ================= REACTIONS ================== _updateNetworkStatusWhenDisconnected = async () => { if (!this.isConnected) await this._updateNetworkStatus(); }; _updateLocalTimeDifferenceWhenSystemTimeChanged = async () => { if (this.isSystemTimeChanged) { Logger.debug('System time change detected'); await this._updateNetworkStatus({ force_ntp_check: true }); } >>>>>>> // ================= REACTIONS ================== _updateNetworkStatusWhenDisconnected = () => { if (!this.isConnected) this._updateNetworkStatus(); <<<<<<< case CardanoNodeStates.RUNNING: this._requestTlsConfig(); break; case CardanoNodeStates.STOPPING: case CardanoNodeStates.EXITING: case CardanoNodeStates.UPDATING: runInAction('reset _tlsConfig', () => this._tlsConfig = null); this._setDisconnected(wasConnected); break; ======= case CardanoNodeStates.RUNNING: await this._requestTlsConfig(); break; >>>>>>> case CardanoNodeStates.RUNNING: await this._requestTlsConfig(); break; case CardanoNodeStates.STOPPING: case CardanoNodeStates.EXITING: case CardanoNodeStates.UPDATING: runInAction('reset _tlsConfig', () => this._tlsConfig = null); this._setDisconnected(wasConnected); break; <<<<<<< _forceCheckTimeDifference = () => { this._updateNetworkStatus({ force_ntp_check: true }); }; // DEFINE ACTIONS @action initialize() { super.initialize(); if (cachedState !== null) Object.assign(this, cachedState); } ======= _extractNodeStatus = (from: Object & CardanoStatus): CardanoStatus => { const { isNodeResponding, isNodeSubscribed, isNodeSyncing, isNodeInSync, hasBeenConnected, } = from; return { isNodeResponding, isNodeSubscribed, isNodeSyncing, isNodeInSync, hasBeenConnected, }; }; >>>>>>> _extractNodeStatus = (from: Object & CardanoStatus): CardanoStatus => { const { isNodeResponding, isNodeSubscribed, isNodeSyncing, isNodeInSync, hasBeenConnected, } = from; return { isNodeResponding, isNodeSubscribed, isNodeSyncing, isNodeInSync, hasBeenConnected, }; }; // DEFINE ACTIONS
<<<<<<< import paperWalletPage1 from '../assets/pdf/paper-wallet-certificate-page-1.png'; import paperWalletPage2 from '../assets/pdf/paper-wallet-certificate-page-2.png'; import paperWalletCertificateBg from '../assets/pdf/paper-wallet-certificate-background.png'; ======= import paperWalletPage1 from '../assets/pdf/paper-wallet-certificate-page-1.inline.svg'; import paperWalletPage2 from '../assets/pdf/paper-wallet-certificate-page-2.inline.svg'; import paperWalletCertificateBgPath from '../assets/pdf/paper-wallet-certificate-background.png'; >>>>>>> import paperWalletPage1 from '../assets/pdf/paper-wallet-certificate-page-1.png'; import paperWalletPage2 from '../assets/pdf/paper-wallet-certificate-page-2.png'; import paperWalletCertificateBgPath from '../assets/pdf/paper-wallet-certificate-background.png'; <<<<<<< doc.image(paperWalletCertificateBg, 0, 0, { fit: [width, height] }); ======= const bgBase64 = await loadAssetChannel.send({ fileName: paperWalletCertificateBgPath }); const bgDataUri = `data:image/png;base64,${bgBase64}`; doc.image(bgDataUri, 0, 4, { fit: [width, height] }); >>>>>>> const bgBase64 = await loadAssetChannel.send({ fileName: paperWalletCertificateBgPath }); const bgDataUri = `data:image/png;base64,${bgBase64}`; doc.image(bgDataUri, 0, 4, { fit: [width, height] });
<<<<<<< isDevelopment: () => environment.NETWORK === 'development', ======= isWatchMode: () => process.env.IS_WATCH_MODE, >>>>>>> isDevelopment: () => environment.NETWORK === 'development', isWatchMode: () => process.env.IS_WATCH_MODE,
<<<<<<< import WalletSettingsStore from './WalletSettingsStore'; ======= import UiDialogsStore from './UiDialogsStore'; >>>>>>> import WalletSettingsStore from './WalletSettingsStore'; import UiDialogsStore from './UiDialogsStore'; <<<<<<< walletSettings: WalletSettingsStore, ======= uiDialogs: UiDialogsStore, >>>>>>> walletSettings: WalletSettingsStore, uiDialogs: UiDialogsStore, <<<<<<< walletSettings: null, ======= uiDialogs: null, >>>>>>> walletSettings: null, uiDialogs: null, <<<<<<< walletSettings: WalletSettingsStore, ======= uiDialogs: UiDialogsStore, >>>>>>> walletSettings: WalletSettingsStore, uiDialogs: UiDialogsStore,
<<<<<<< import { ipcRenderer } from 'electron'; ======= import moment from 'moment'; >>>>>>> import { ipcRenderer } from 'electron'; import moment from 'moment'; <<<<<<< ======= this._updateMomentJsLocaleAfterLocaleChange, this._redirectToMainUiAfterLocaleIsSet, >>>>>>> this._updateMomentJsLocaleAfterLocaleChange, <<<<<<< _getSendLogsChoice = async () => await this.getSendLogsChoiceRequest.execute().promise; _setSendLogsChoice = async ({ sendLogs }: { sendLogs: boolean }) => { await this.setSendLogsChoiceRequest.execute(sendLogs).promise; await this._sendLogsChoiceToMainProcess(); }; _sendLogsChoiceToMainProcess = async () => { const choice = await this._getSendLogsChoice(); ipcRenderer.send('send-logs-choice', choice); }; ======= _updateMomentJsLocaleAfterLocaleChange = () => { moment.locale(this.currentLocale); }; >>>>>>> _getSendLogsChoice = async () => await this.getSendLogsChoiceRequest.execute().promise; _setSendLogsChoice = async ({ sendLogs }: { sendLogs: boolean }) => { await this.setSendLogsChoiceRequest.execute(sendLogs).promise; await this._sendLogsChoiceToMainProcess(); }; _sendLogsChoiceToMainProcess = async () => { const choice = await this._getSendLogsChoice(); ipcRenderer.send('send-logs-choice', choice); };
<<<<<<< SELECT, INPUT, FORM_FIELD, SWITCH, ======= SELECT, INPUT, FORM_FIELD, CHECKBOX, >>>>>>> SELECT, INPUT, FORM_FIELD, CHECKBOX, SWITCH, <<<<<<< import SimpleSwitch from './simple/SimpleSwitch.scss'; ======= import SimpleCheckbox from './simple/SimpleCheckbox.scss'; >>>>>>> import SimpleCheckbox from './simple/SimpleCheckbox.scss'; import SimpleSwitch from './simple/SimpleSwitch.scss'; <<<<<<< [SWITCH]: SimpleSwitch, ======= [CHECKBOX]: SimpleCheckbox, >>>>>>> [CHECKBOX]: SimpleCheckbox, [SWITCH]: SimpleSwitch,
<<<<<<< import { getSupportUrl } from '../../../utils/network'; import successIcon from '../../../assets/images/success-small.inline.svg'; import NotificationMessage from '../../../components/widgets/NotificationMessage'; import { DOWNLOAD_LOGS_SUCCESS_DURATION } from '../../../config/timingConfig'; const messages = defineMessages({ supportRequestLinkUrl: { id: 'settings.support.reportProblem.linkUrl', defaultMessage: '!!!https://iohk.zendesk.com/hc/en-us/categories/360000877653-Daedalus-wallet-mainnet', description: '"Support request" link URL in the "Report a problem" section on the support settings page.', }, downloadLogsSuccess: { id: 'settings.support.reportProblem.downloadLogsSuccessMessage', defaultMessage: '!!!Logs were downloaded', description: 'Success message for download logs.', }, }); ======= import { getSupportUrl } from '../../../utils/network'; const messages = defineMessages({ supportRequestLinkUrl: { id: 'settings.support.reportProblem.linkUrl', defaultMessage: '!!!https://iohk.zendesk.com/hc/en-us/requests/new/', description: '"Support request" link URL in the "Report a problem" section on the support settings page.', }, }); >>>>>>> import { getSupportUrl } from '../../../utils/network'; import successIcon from '../../../assets/images/success-small.inline.svg'; import NotificationMessage from '../../../components/widgets/NotificationMessage'; import { DOWNLOAD_LOGS_SUCCESS_DURATION } from '../../../config/timingConfig'; const messages = defineMessages({ supportRequestLinkUrl: { id: 'settings.support.reportProblem.linkUrl', defaultMessage: '!!!https://iohk.zendesk.com/hc/en-us/requests/new/', description: '"Support request" link URL in the "Report a problem" section on the support settings page.', }, downloadLogsSuccess: { id: 'settings.support.reportProblem.downloadLogsSuccessMessage', defaultMessage: '!!!Logs were downloaded', description: 'Success message for download logs.', }, }); <<<<<<< <Fragment> <SupportSettings onExternalLinkClick={stores.app.openExternalLink} onSupportRequestClick={this.handleSupportRequestClick} onDownloadLogs={this.handleDownloadLogs} /> <NotificationMessage icon={successIcon} show={stores.uiNotifications.isOpen(id)} onClose={() => this.props.actions.notifications.closeActiveNotification.trigger({ id })} clickToClose hasCloseButton > {message} </NotificationMessage> </Fragment> ======= <SupportSettings onExternalLinkClick={this.props.stores.app.openExternalLink} onSupportRequestClick={this.handleSupportRequestClick} onDownloadLogs={this.handleDownloadLogs} /> >>>>>>> <Fragment> <SupportSettings onExternalLinkClick={stores.app.openExternalLink} onSupportRequestClick={this.handleSupportRequestClick} onDownloadLogs={this.handleDownloadLogs} /> <NotificationMessage icon={successIcon} show={stores.uiNotifications.isOpen(id)} onClose={() => this.props.actions.notifications.closeActiveNotification.trigger({ id })} clickToClose hasCloseButton > {message} </NotificationMessage> </Fragment>
<<<<<<< <InlineEditingInput inputFieldLabel={intl.formatMessage(messages.name)} inputFieldValue={walletName} isActive={activeField === 'name'} onStartEditing={() => onStartEditing('name')} onStopEditing={onStopEditing} onCancelEditing={onCancelEditing} onSubmit={(value) => onFieldValueChange('name', value)} isValid={nameValidator} validationErrorMessage={intl.formatMessage(globalMessages.invalidWalletName)} successfullyUpdated={!isSubmitting && lastUpdatedField === 'name' && !isInvalid} /> <Dropdown ======= <Select className={styles.assuranceLevelSelect} >>>>>>> <InlineEditingInput inputFieldLabel={intl.formatMessage(messages.name)} inputFieldValue={walletName} isActive={activeField === 'name'} onStartEditing={() => onStartEditing('name')} onStopEditing={onStopEditing} onCancelEditing={onCancelEditing} onSubmit={(value) => onFieldValueChange('name', value)} isValid={nameValidator} validationErrorMessage={intl.formatMessage(globalMessages.invalidWalletName)} successfullyUpdated={!isSubmitting && lastUpdatedField === 'name' && !isInvalid} /> <Select className={styles.assuranceLevelSelect}
<<<<<<< import StakingDelegationCountdownPage from './StakingDelegationCountdownPage'; ======= >>>>>>>
<<<<<<< setup() { ======= _localDifficultyStartedWith = null; constructor(...args) { super(...args); >>>>>>> _localDifficultyStartedWith = null; setup() { <<<<<<< @computed get syncPercentage(): number { if (this.networkDifficulty > 0) { return this.localDifficulty / this.networkDifficulty * 100; ======= @computed get syncPercentage() { if (this.networkDifficulty > 0 && this._localDifficultyStartedWith != null) { const relativeLocal = this.localDifficulty - this._localDifficultyStartedWith; const relativeNetwork = this.networkDifficulty - this._localDifficultyStartedWith; return relativeLocal / relativeNetwork * 100; >>>>>>> @computed get syncPercentage() { if (this.networkDifficulty > 0 && this._localDifficultyStartedWith != null) { const relativeLocal = this.localDifficulty - this._localDifficultyStartedWith; const relativeNetwork = this.networkDifficulty - this._localDifficultyStartedWith; return relativeLocal / relativeNetwork * 100; <<<<<<< case 'LocalDifficultyChanged': this.localDifficulty = message.contents.getChainDifficulty; ======= case "LocalDifficultyChanged": const difficulty = message.contents.getChainDifficulty; if (this._localDifficultyStartedWith == null) { this._localDifficultyStartedWith = difficulty; } this.localDifficulty = difficulty; >>>>>>> case "LocalDifficultyChanged": const difficulty = message.contents.getChainDifficulty; if (this._localDifficultyStartedWith == null) { this._localDifficultyStartedWith = difficulty; } this.localDifficulty = difficulty;
<<<<<<< exportWalletToFile(request: ExportWalletToFileRequest): Promise<ExportWalletToFileResponse>, ======= setUserTheme(theme: string): Promise<string>, getUserTheme(): Promise<string>, >>>>>>> exportWalletToFile(request: ExportWalletToFileRequest): Promise<ExportWalletToFileResponse>, setUserTheme(theme: string): Promise<string>, getUserTheme(): Promise<string>,
<<<<<<< return ( <Layout> <Plugins plugins={plugins} /> </Layout> ) ======= return <Layout> <PluginsList plugins={plugins} /> </Layout> >>>>>>> return ( <Layout> <PluginsList plugins={plugins} /> </Layout> )
<<<<<<< compilesTo(emblem, '<x-modal><@header as |@title|>Header {{title}}</@header><@body>Body</@body><@footer>Footer</@footer></x-modal>'); }); test('module namespaces', function() { var emblem = w( '% my-addon::foo' ) compilesTo(emblem, '<my-addon::foo></my-addon::foo>'); ======= assert.compilesTo(emblem, '<x-modal><@header as |@title|>Header {{title}}</@header><@body>Body</@body><@footer>Footer</@footer></x-modal>'); >>>>>>> assert.compilesTo(emblem, '<x-modal><@header as |@title|>Header {{title}}</@header><@body>Body</@body><@footer>Footer</@footer></x-modal>'); }); test('module namespaces', function() { var emblem = w( '% my-addon::foo' ) compilesTo(emblem, '<my-addon::foo></my-addon::foo>');
<<<<<<< var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => { return r1 !== r2; }}); if (this.props.refreshable === true && Platform.OS !== 'android') { ======= if (this.props.refreshable === true) { >>>>>>> if (this.props.refreshable === true && Platform.OS !== 'android') {
<<<<<<< if (!this.cachedMaps) { ======= this._super(...arguments); if (!this.get('cachedMaps')) { >>>>>>> this._super(...arguments); if (!this.cachedMaps) {
<<<<<<< // asyncData method if (Component.options.asyncData && typeof Component.options.asyncData === 'function') { var promise = promisify(Component.options.asyncData, context) promise.then((asyncDataResult) => { ======= // Create this context for asyncData & fetch (used for dynamic component injection) const _this = { components: {} } const hasAsyncData = Component.options.asyncData && typeof Component.options.asyncData === 'function' const hasFetch = !!Component.options.fetch <% if(loading) { %>const loadingIncrease = (hasAsyncData && hasFetch) ? 30 : 45<% } %> // Call asyncData(context) if (hasAsyncData) { const promise = promisify(Component.options.asyncData.bind(_this), context) .then(asyncDataResult => { >>>>>>> const hasAsyncData = Component.options.asyncData && typeof Component.options.asyncData === 'function' const hasFetch = !!Component.options.fetch <% if(loading) { %>const loadingIncrease = (hasAsyncData && hasFetch) ? 30 : 45<% } %> // Call asyncData(context) if (hasAsyncData) { const promise = promisify(Component.options.asyncData, context) .then(asyncDataResult => { <<<<<<< if (Component.options.fetch) { var p = Component.options.fetch(context) if (!p || (!(p instanceof Promise) && (typeof p.then !== 'function'))) { p = Promise.resolve(p) } <%= (loading ? 'p.then(() => this.$loading.increase && this.$loading.increase(30))' : '') %> ======= // Call fetch(context) if (hasFetch) { let p = Component.options.fetch.call(_this, context) if (!p || (!(p instanceof Promise) && (typeof p.then !== 'function'))) { p = Promise.resolve(p) } p.then(fetchResult => { <% if(loading) { %>if(this.$loading.increase) this.$loading.increase(loadingIncrease)<% } %> }) >>>>>>> // Call fetch(context) if (hasFetch) { let p = Component.options.fetch(context) if (!p || (!(p instanceof Promise) && (typeof p.then !== 'function'))) { p = Promise.resolve(p) } p.then(fetchResult => { <% if(loading) { %>if(this.$loading.increase) this.$loading.increase(loadingIncrease)<% } %> }) <<<<<<< return Promise.all(promises) ======= return Promise.all(promises).then(() => { Object.keys(_this.components).forEach((name) => { // Sanetize resolved components (Temporary workaround for vue-loader 13.0.0) _this.components[name] = _this.components[name].default || _this.components[name] Component.options.components[name] = _this.components[name] }) }) >>>>>>> return Promise.all(promises)
<<<<<<< ignorePrefix: '-', ======= extensions: [], >>>>>>> ignorePrefix: '-', extensions: [],
<<<<<<< router.get("/", asyncHandler(async (req, res, next) => { try { if (req.session.host == null || req.session.host.trim() == "") { if (req.cookies['rpc-host']) { res.locals.host = req.cookies['rpc-host']; } ======= var noTxIndexMsg = "\n\nYour node does not have `txindex` enabled. Without it, you can only lookup wallet, mempool, and recently confirmed transactions by their `txid`. Searching for non-wallet transactions that were confirmed more than "+config.noTxIndexSearchDepth+" blocks ago is only possible if you provide the confirmed block height in addition to the txid, using `<txid>@<height>` in the search box."; router.get("/", function(req, res, next) { if (req.session.host == null || req.session.host.trim() == "") { if (req.cookies['rpc-host']) { res.locals.host = req.cookies['rpc-host']; } >>>>>>> var noTxIndexMsg = "\n\nYour node does not have `txindex` enabled. Without it, you can only lookup wallet, mempool, and recently confirmed transactions by their `txid`. Searching for non-wallet transactions that were confirmed more than "+config.noTxIndexSearchDepth+" blocks ago is only possible if you provide the confirmed block height in addition to the txid, using `<txid>@<height>` in the search box."; router.get("/", asyncHandler(async (req, res, next) => { try { if (req.session.host == null || req.session.host.trim() == "") { if (req.cookies['rpc-host']) { res.locals.host = req.cookies['rpc-host']; } <<<<<<< promises.push(new Promise(async (resolve, reject) => { const blockStats = await utils.timePromise("promises.block-height.getBlockStats", coreApi.getBlockStats(result.hash)); res.locals.result.blockstats = blockStats; resolve(); ======= promises.push(new Promise(function(resolve, reject) { coreApi.getBlockStats(result.hash).then(function(result) { res.locals.result.blockstats = result; resolve(); }).catch(function(err) { // unavailable, likely due to pruning debugLog('Failed loading block stats', err) res.locals.result.blockstats = null; resolve(); }); >>>>>>> promises.push(new Promise(async (resolve, reject) => { try { const blockStats = await utils.timePromise("promises.block-height.getBlockStats", coreApi.getBlockStats(result.hash)); res.locals.result.blockstats = blockStats; resolve(); } catch (err) { if (global.prunedBlockchain) { // unavailable, likely due to pruning debugLog('Failed loading block stats', err); res.locals.result.blockstats = null; resolve(); } else { throw err; } } <<<<<<< router.get("/tx/:transactionId", asyncHandler(async (req, res, next) => { try { var txid = utils.asHash(req.params.transactionId); ======= router.get("/tx/:transactionId@:blockHeight", function(req, res, next) { req.query.blockHeight = req.params.blockHeight; req.url = "/tx/" + req.params.transactionId; next(); }); router.get("/tx/:transactionId", function(req, res, next) { var txid = utils.asHash(req.params.transactionId); >>>>>>> router.get("/tx/:transactionId@:blockHeight", asyncHandler(async (req, res, next) => { req.query.blockHeight = req.params.blockHeight; req.url = "/tx/" + req.params.transactionId; next(); })); router.get("/tx/:transactionId", asyncHandler(async (req, res, next) => { try { var txid = utils.asHash(req.params.transactionId); <<<<<<< } catch (err) { res.locals.userMessageMarkdown = `Failed to load transaction: txid=**${txid}**`; ======= }).catch(function(err) { if (!global.txindexAvailable) { res.locals.noTxIndexMsg = noTxIndexMsg; } >>>>>>> } catch (err) { res.locals.userMessageMarkdown = `Failed to load transaction: txid=**${txid}**`; if (!global.txindexAvailable) { res.locals.noTxIndexMsg = noTxIndexMsg; }
<<<<<<< var sso = require('./app/sso.js'); var marked = require("marked"); ======= var markdown = require("markdown-it")(); >>>>>>> var sso = require('./app/sso.js'); var markdown = require("markdown-it")();
<<<<<<< '@vue/compiler-dom' ======= '@vue/compiler-dom', 'lodash/mergeWith', 'lodash/isString' >>>>>>> '@vue/compiler-dom', <<<<<<< '@vue/compiler-dom': 'VueCompilerDOM' ======= '@vue/compiler-dom': 'VueCompilerDOM', 'lodash/mergeWith': '_.mergeWith', 'lodash/isString': '_.isString', >>>>>>> '@vue/compiler-dom': 'VueCompilerDOM',
<<<<<<< var defaultColorPattern = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'], //same as d3.scale.category10() color = generateColor(__data_colors, notEmpty(__color_pattern) ? __color_pattern : defaultColorPattern, __data_color), levelColor = generateLevelColor(__color_pattern, __color_values); ======= var defaultColorPattern = d3.scale.category10().range(), color = generateColor(__data_colors, notEmpty(__color_pattern) ? __color_pattern : defaultColorPattern, __data_color); >>>>>>> var defaultColorPattern = d3.scale.category10().range(), color = generateColor(__data_colors, notEmpty(__color_pattern) ? __color_pattern : defaultColorPattern, __data_color), levelColor = generateLevelColor(__color_pattern, __color_values); <<<<<<< x = c[0], y = c[1], h = Math.sqrt(x * x + y * y); translate = __gauge_style == 'arc' ? "translate(1,1)" : "translate(" + ((x / h) * radius * 0.8) + ',' + ((y / h) * radius * 0.8) + ")"; ======= x = c[0]; y = c[1]; h = Math.sqrt(x * x + y * y); // TODO: ratio should be an option? ratio = (36 / radius > 0.375 ? 1.175 - 36 / radius : 0.8) * radius / h; translate = "translate(" + (x * ratio) + ',' + (y * ratio) + ")"; >>>>>>> x = c[0]; y = c[1]; h = Math.sqrt(x * x + y * y); // TODO: ratio should be an option? ratio = (36 / radius > 0.375 ? 1.175 - 36 / radius : 0.8) * radius / h; translate = __gauge_style == 'arc' ? "translate(1,1)" : "translate(" + (x * ratio) + ',' + (y * ratio) + ")"; <<<<<<< })(); // usage replaced by generateDrawArea function generateDrawArea(areaIndices, isSub) { var area, getPoint = generateGetAreaPoint(areaIndices, isSub); if (__axis_rotated) { area = d3.svg.area() .x0(function (d, i) { return getYScale(d.id)(0); }) .x1(function (d, i) { return getYScale(d.id)(d.value); }) .y(xx); } else { area = d3.svg.area() .x(xx) .y0(function (d, i) { if (__data_groups.length > 0) { var point = getPoint(d,i); return point[0][1]; } return getYScale(d.id)(0); }) .y1(function (d, i) { if (__data_groups.length > 0) { var point = getPoint(d,i); return point[1][1]; } return getYScale(d.id)(d.value); }); } return function (d, i) { var data = filterRemoveNull(d.values), x0, y0; if (hasType([d], 'area') || hasType([d], 'area-spline')) { isSplineType(d) ? area.interpolate("cardinal") : area.interpolate("linear"); return area(data); } else if (hasType([d], 'area-step')) { isStepType(d) ? area.interpolate("step-after") : area.interpolate("linear"); return area(data); } else { x0 = x(data[0].x); y0 = getYScale(d.id)(data[0].value); return __axis_rotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0; } }; } ======= })(); function generateDrawLine(isSub) { var yScaleGetter = isSub ? getSubYScale : getYScale, xValue = isSub ? xx : subxx, yValue = function (d) { return yScaleGetter(d.id)(d.value); }, line = d3.svg.line() .x(__axis_rotated ? yValue : xValue) .y(__axis_rotated ? xValue : yValue); if (!__line_connect_null) { line = line.defined(function (d) { return d.value != null; }); } return function (d) { var data = __line_connect_null ? filterRemoveNull(d.values) : d.values, x = isSub ? x : subX, y = yScaleGetter(d.id), x0 = 0, y0 = 0; if (isLineType(d)) { if (__data_regions[d.id]) { return lineWithRegions(data, x, y, __data_regions[d.id]); } else { line.interpolate(isSplineType(d) ? "cardinal" : "linear"); return line(data); } } else { if (data[0]) { x0 = x(data[0].x); y0 = y(data[0].value); } return __axis_rotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0; } }; } >>>>>>> } <<<<<<< function generateGetLinePoint(lineIndices, isSub) { // partial duplication of generateGetBarPoints var lineTargetsNum = lineIndices.__max__ + 1, x = getLineX(lineTargetsNum, lineIndices, !!isSub), y = getLineY(!!isSub), lineOffset = getLineOffset(lineIndices, !!isSub), yScale = isSub ? getSubYScale : getYScale; return function (d, i) { var y0 = yScale(d.id)(0), offset = lineOffset(d, i) || y0, // offset is for stacked area chart posX = x(d), posY = y(d); // fix posY not to overflow opposite quadrant if (__axis_rotated) { if ((d.value > 0 && posY < offset) || (d.value < 0 && posY > offset)) { posY = offset; } } // 1 point that marks the line position return [ [posX, posY - (y0 - offset)] ]; }; } // For brush region var lineOnSub = (function () { var line = d3.svg.line() .x(__axis_rotated ? function (d) { return getSubYScale(d.id)(d.value); } : subxx) .y(__axis_rotated ? subxx : function (d) { return getSubYScale(d.id)(d.value); }); return function (d) { var data = filterRemoveNull(d.values); if (isLineType(d)) { return line(data); } else if (isStepType(d)) { line.interpolate("step-after"); return line(data); } else { return "M " + subX(data[0].x) + " " + getSubYScale(d.id)(data[0].value); } }; })(); var areaOnSub = (function () { var area = d3.svg.area() .x(xx) .y0(function (d) { return getSubYScale(d.id)( (__axis_y_min) ? __axis_y_min : 0 ); }) .y1(function (d) { return getSubYScale(d.id)(d.value); }); return function (d) { var data = filterRemoveNull(d.values), x0, y0; if (hasType([d], 'area') || hasType([d], 'area-spline')) { isSplineType(d) ? area.interpolate("cardinal") : area.interpolate("linear"); return area(data); } else if (hasType([d], 'area-step')) { isStepType(d) ? area.interpolate("step-after") : area.interpolate("linear"); return area(data); } else { x0 = subX(data[0].x); y0 = getSubYScale(d.id)(data[0].value); return __axis_rotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0; } }; })(); ======= >>>>>>> function generateGetLinePoint(lineIndices, isSub) { // partial duplication of generateGetBarPoints var lineTargetsNum = lineIndices.__max__ + 1, x = getLineX(lineTargetsNum, lineIndices, !!isSub), y = getLineY(!!isSub), lineOffset = getLineOffset(lineIndices, !!isSub), yScale = isSub ? getSubYScale : getYScale; return function (d, i) { var y0 = yScale(d.id)(0), offset = lineOffset(d, i) || y0, // offset is for stacked area chart posX = x(d), posY = y(d); // fix posY not to overflow opposite quadrant if (__axis_rotated) { if ((d.value > 0 && posY < offset) || (d.value < 0 && posY > offset)) { posY = offset; } } // 1 point that marks the line position return [ [posX, posY - (y0 - offset)] ]; }; }
<<<<<<< zoom_x_min: undefined, zoom_x_max: undefined, ======= zoom_onzoomstart: function () {}, zoom_onzoomend: function () {}, >>>>>>> zoom_onzoomstart: function () {}, zoom_onzoomend: function () {}, zoom_x_min: undefined, zoom_x_max: undefined,
<<<<<<< <div className="scroller"> <SendMessage addMessage={this.addMessage} selectedTab={selectedTab} changeEvent={this.changeEvent} events={selectedTab.events}/> <ListenEvent url={selectedTab.url} events={selectedTab.events} addEvent={this.addEvent} checkEvent={this.checkEvent} deleteEvent={this.deleteEvent} removeSocket={this.removeSocket} /> </div> ======= <SendMessage addMessage={this.addMessage} changeEvent={this.changeEvent} events={selectedTab.events}/> <ListenEvent url={selectedTab.url} events={selectedTab.events} addEvent={this.addEvent} checkEvent={this.checkEvent} deleteEvent={this.deleteEvent} removeSocket={this.removeSocket} /> >>>>>>> <div className="scroller"> <SendMessage addMessage={this.addMessage} changeEvent={this.changeEvent} events={selectedTab.events}/> <ListenEvent url={selectedTab.url} events={selectedTab.events} addEvent={this.addEvent} checkEvent={this.checkEvent} deleteEvent={this.deleteEvent} removeSocket={this.removeSocket} /> </div>
<<<<<<< var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) { ======= var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) { >>>>>>> var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) { <<<<<<< var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) { ======= var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) { >>>>>>> var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) { <<<<<<< var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) { ======= var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) { >>>>>>> var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) { <<<<<<< var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) { ======= var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) { >>>>>>> var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) { <<<<<<< var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) { ======= var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) { >>>>>>> var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
<<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>>
<<<<<<< var _user = require('../models/user.js'); var _user2 = _interopRequireDefault(_user); ======= var _group = require('../models/group'); var _group2 = _interopRequireDefault(_group); >>>>>>> var _user = require('../models/user.js'); var _user2 = _interopRequireDefault(_user); var _group = require('../models/group'); var _group2 = _interopRequireDefault(_group);
<<<<<<< ======= ======= >>>>>>> <<<<<<< ======= >>>>>>>
<<<<<<< props.role === "admin"?<Menu.Item style={{"background":"#32363a",color:"white"}} key="1"> <Link to={`/user/list`}><Icon type="solution" />用户管理</Link> ======= props.role === "admin"?<Menu.Item style={{"background":"#32363a",color:"white"}} key="2"> <Link style={{color:"white"}} to={`/user/list`}><Icon type="solution" />用户管理</Link> >>>>>>> props.role === "admin"?<Menu.Item key="2"> <Link to={`/user/list`}><Icon type="solution" />用户管理</Link> <<<<<<< <Menu.Item key="2"> <a onClick={props.logout}><Icon type="logout" />退出</a> ======= <Menu.Item key="3"> <a style={{color:"white"}} onClick={props.logout}><Icon type="logout" />退出</a> >>>>>>> <Menu.Item key="3"> <a onClick={props.logout}><Icon type="logout" />退出</a>
<<<<<<< <Menu.Item key="1"> <a onClick={props.logout}><Icon type="logout" />退出</a> ======= { props.role === "admin"?<Menu.Item style={{"background":"#32363a",color:"white"}} key="1"> <Link style={{color:"white"}} to={`/user/list`}><Icon type="solution" />用户管理</Link> </Menu.Item>:"" } <Menu.Item key="2"> <a style={{color:"white"}} onClick={props.logout}><Icon type="logout" />退出</a> >>>>>>> { props.role === "admin"?<Menu.Item style={{"background":"#32363a",color:"white"}} key="1"> <Link to={`/user/list`}><Icon type="solution" />用户管理</Link> </Menu.Item>:"" } <Menu.Item key="2"> <a onClick={props.logout}><Icon type="logout" />退出</a>
<<<<<<< var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result, count; ======= var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; >>>>>>> var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; <<<<<<< var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, result; ======= var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; >>>>>>> var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; <<<<<<< var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, checkRepeat, data, result; ======= var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result; >>>>>>> var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result;
<<<<<<< createAction('user', 'change_password', 'post', 'changePassword'); ======= createAction('user', 'search', 'get', 'search') >>>>>>> createAction('user', 'change_password', 'post', 'changePassword') createAction('user', 'search', 'get', 'search') <<<<<<< createAction('project', 'get_member_list', 'get', 'getMemberList') ======= createAction('project', 'search', 'get', 'search') >>>>>>> createAction('project', 'get_member_list', 'get', 'getMemberList') createAction('project', 'search', 'get', 'search')
<<<<<<< import Interface from './Interface/Interface.js' import { getProject } from '../../reducer/modules/project'; ======= import { Interface } from './Interface/Interface.js' import { Activity } from './Activity/Activity.js' import { Setting } from './Setting/Setting.js' >>>>>>> import { getProject } from '../../reducer/modules/project'; import { Interface } from './Interface/Interface.js' import { Activity } from './Activity/Activity.js' import { Setting } from './Setting/Setting.js'
<<<<<<< let count = await this.Model.listCount(); let uids = []; result.forEach( (item)=> { if(uids.indexOf(item.uid) !== -1){ uids.push(item.uid) } } ) let _users = {}, users = await yapi.getInst(userModel).findByUids(uids); users.forEach((item)=> { _users[item._id] = item; } ) ======= let count = await this.Model.listCount(group_id); >>>>>>> let count = await this.Model.listCount(group_id); let uids = []; result.forEach( (item)=> { if(uids.indexOf(item.uid) !== -1){ uids.push(item.uid) } } ) let _users = {}, users = await yapi.getInst(userModel).findByUids(uids); users.forEach((item)=> { _users[item._id] = item; } )
<<<<<<< curGroupId: state.group.currGroup._id, curUserRole: state.group.currGroup.role ======= curGroupId: state.group.currGroup._id, currGroup: state.group.currGroup >>>>>>> curGroupId: state.group.currGroup._id, curUserRole: state.group.currGroup.role, currGroup: state.group.currGroup <<<<<<< curGroupId: PropTypes.number, curUserRole: PropTypes.string ======= curGroupId: PropTypes.number, currGroup: PropTypes.object >>>>>>> curGroupId: PropTypes.number, curUserRole: PropTypes.string, currGroup: PropTypes.object <<<<<<< ======= console.log(this.props.currGroup) >>>>>>> <<<<<<< <TabPane tab="成员列表" key="2"><MemberList/></TabPane> {["admin","owner","guest","dev"].indexOf(this.props.curUserRole)>-1?<TabPane tab="分组动态" key="3"><GroupLog/></TabPane>:""} ======= { this.props.currGroup.type === 'public'?<TabPane tab="成员列表" key="2"><MemberList/></TabPane>:null } <TabPane tab="分组动态" key="3"><GroupLog/></TabPane> >>>>>>> {this.props.currGroup.type === 'public'?<TabPane tab="成员列表" key="2"><MemberList/></TabPane>:null} {["admin","owner","guest","dev"].indexOf(this.props.curUserRole)>-1?<TabPane tab="分组动态" key="3"><GroupLog/></TabPane>:""}
<<<<<<< import { Route, HashRouter} from 'react-router-dom' import { Home, ProjectGroups, Interface } from './containers/index' import User from './containers/User/User.js' // import UserProfile from './containers/User/Profile.js' ======= import { Route, HashRouter } from 'react-router-dom' import { Home, ProjectGroups, Interface, News } from './containers/index' >>>>>>> import { Route, HashRouter } from 'react-router-dom' import { Home, ProjectGroups, Interface, News } from './containers/index' import User from './containers/User/User.js' <<<<<<< <Route path="/user" component={User} /> </div> ======= <Route path="/News" component={ News } /> </div> >>>>>>> <Route path="/user" component={User} /> <Route path="/News" component={ News } /> </div>
<<<<<<< import { Input, Icon, Button, Modal, message, Tooltip, Tree, Dropdown, Menu, Form } from 'antd'; import ImportInterface from './ImportInterface' ======= import { Input, Icon, Button, Modal, message, Tooltip, Tree, Form } from 'antd'; >>>>>>> // import { Input, Icon, Button, Modal, message, Tooltip, Tree, Dropdown, Menu, Form } from 'antd'; import ImportInterface from './ImportInterface' import { Input, Icon, Button, Modal, message, Tooltip, Tree, Form } from 'antd'; <<<<<<< const menu = (col) => { return ( <Menu> <Menu.Item> <span onClick={() => this.showColModal('edit', col)}>修改集合</span> </Menu.Item> <Menu.Item> <span onClick={() => { this.showDelColConfirm(col._id) }}>删除集合</span> </Menu.Item> <Menu.Item> <span onClick={() => this.showImportInterface(col._id)}>导入接口</span> </Menu.Item> </Menu> ) }; ======= // const menu = (col) => { // return ( // <Menu> // <Menu.Item> // <span onClick={() => this.showColModal('edit', col)}>修改集合</span> // </Menu.Item> // <Menu.Item> // <span onClick={() => { // this.showDelColConfirm(col._id) // }}>删除集合</span> // </Menu.Item> // </Menu> // ) // }; >>>>>>> // const menu = (col) => { // return ( // <Menu> // <Menu.Item> // <span onClick={() => this.showColModal('edit', col)}>修改集合</span> // </Menu.Item> // <Menu.Item> // <span onClick={() => { // this.showDelColConfirm(col._id) // }}>删除集合</span> // </Menu.Item> // <Menu.Item> // <span onClick={() => this.showImportInterface(col._id)}>导入接口</span> // </Menu.Item> // </Menu> // ) // };
<<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< yapi.common.log('mockStatisError', e); ======= yapi.commons.log('mockStatisError', e); >>>>>>> yapi.commons.log('mockStatisError', e);
<<<<<<< var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result, count; ======= var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; >>>>>>> var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; <<<<<<< var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, result; ======= var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; >>>>>>> var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; <<<<<<< var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, checkRepeat, data, result; ======= var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result; >>>>>>> var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result;
<<<<<<< export const FETCH_NEWS_DATA = 'FETCH_NEWS_DATA' // User export const CHANGE_CUR_UID = 'CHANGE_CUR_UID' ======= export const FETCH_NEWS_DATA = 'FETCH_NEWS_DATA'; export const FETCH_MORE_NEWS = 'FETCH_MORE_NEWS'; >>>>>>> export const FETCH_NEWS_DATA = 'FETCH_NEWS_DATA'; export const FETCH_MORE_NEWS = 'FETCH_MORE_NEWS'; // User export const CHANGE_CUR_UID = 'CHANGE_CUR_UID'
<<<<<<< export const FETCH_NEWS_DATA = 'FETCH_NEWS_DATA' // User export const CHANGE_CUR_UID = 'CHANGE_CUR_UID' ======= export const FETCH_NEWS_DATA = 'FETCH_NEWS_DATA'; export const FETCH_MORE_NEWS = 'FETCH_MORE_NEWS'; >>>>>>> export const FETCH_NEWS_DATA = 'FETCH_NEWS_DATA'; export const FETCH_MORE_NEWS = 'FETCH_MORE_NEWS'; // User export const CHANGE_CUR_UID = 'CHANGE_CUR_UID'
<<<<<<< var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result, count; ======= var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; >>>>>>> var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; <<<<<<< var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, result; ======= var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; >>>>>>> var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; <<<<<<< var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, checkRepeat, data, result; ======= var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result; >>>>>>> var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result;
<<<<<<< import iconv from 'iconv-lite' ======= const { ipcRenderer } = require('electron') >>>>>>> import iconv from 'iconv-lite' const { ipcRenderer } = require('electron')
<<<<<<< <Menu.Item key="1"> <a onClick={props.logout}><Icon type="logout" />退出</a> ======= { props.role === "admin"?<Menu.Item style={{"background":"#32363a",color:"white"}} key="1"> <Link style={{color:"white"}} to={`/user/list`}><Icon type="solution" />用户管理</Link> </Menu.Item>:"" } <Menu.Item key="2"> <a style={{color:"white"}} onClick={props.logout}><Icon type="logout" />退出</a> >>>>>>> { props.role === "admin"?<Menu.Item style={{"background":"#32363a",color:"white"}} key="1"> <Link to={`/user/list`}><Icon type="solution" />用户管理</Link> </Menu.Item>:"" } <Menu.Item key="2"> <a onClick={props.logout}><Icon type="logout" />退出</a>
<<<<<<< var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ctx) { ======= var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) { >>>>>>> var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(ctx) { <<<<<<< var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(ctx) { ======= var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) { >>>>>>> var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(ctx) { <<<<<<< var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(ctx) { ======= var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) { >>>>>>> var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(ctx) { <<<<<<< var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(ctx) { ======= var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) { >>>>>>> var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(ctx) { <<<<<<< var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(ctx) { ======= var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(ctx) { >>>>>>> var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(ctx) {
<<<<<<< var _log = require('../models/log.js'); var _log2 = _interopRequireDefault(_log); ======= var _json = require('json5'); var _json2 = _interopRequireDefault(_json); >>>>>>> var _log = require('../models/log.js'); var _log2 = _interopRequireDefault(_log); var _json = require('json5'); var _json2 = _interopRequireDefault(_json);
<<<<<<< var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result, count; ======= var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; >>>>>>> var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(ctx) { var uid, page, limit, result; <<<<<<< var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, result; ======= var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; >>>>>>> var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(ctx) { var params, uid, checkRepeat, result; <<<<<<< var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, checkRepeat, data, result; ======= var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result; >>>>>>> var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(ctx) { var params, uid, checkRepeat, data, result;
<<<<<<< gDownloader.install(disabled, openEditor).then(finish).catch(err => { gRvDetails.errorHeader = _('install_failed'); gRvDetails.errorList = [err.message || err.name]; document.body.className = 'error'; }); ======= gDownloader.install('install', disabled, openEditor) .then(finish) .catch(err => { gRvDetails.errorHeader = _('install_failed'); gRvDetails.errorList = [err.message]; document.body.className = 'error'; }); >>>>>>> gDownloader.install('install', disabled, openEditor) .then(finish) .catch(err => { gRvDetails.errorHeader = _('install_failed'); gRvDetails.errorList = [err.message || err.name]; document.body.className = 'error'; });
<<<<<<< chrome.tabs.executeScript(detail.tabId, options, result => { if (!chrome.runtime.lastError) return; const errMsg = chrome.runtime.lastError.message; ======= chrome.tabs.executeScript(detail.tabId, options, () => { let err = chrome.runtime.lastError; if (!err) return; >>>>>>> chrome.tabs.executeScript(detail.tabId, options, () => { if (!chrome.runtime.lastError) return; const errMsg = chrome.runtime.lastError.message;
<<<<<<< 'use strict'; window.addEventListener('hashchange', onHashChange, false); window.addEventListener('keydown', onKeypress, false); window.addEventListener('DOMContentLoaded', onLoad, true); window.addEventListener('unload', onUnload, false); ======= window.addEventListener('DOMContentLoaded', onLoad, false); window.addEventListener('contextmenu', onContextMenu, false); window.addEventListener('click', onClick, false); window.addEventListener('mouseover', onMouseOver, false); window.addEventListener('mouseout', onMouseOut, false); window.addEventListener('keydown', onKeyDown, false); window.addEventListener('transitionend', onTransitionEnd, false); // When closing, navigate to main including its 'trigger pending uninstall'. window.addEventListener('unload', navigateToMainMenu, false); >>>>>>> 'use strict'; window.addEventListener('DOMContentLoaded', onLoad, false); window.addEventListener('contextmenu', onContextMenu, false); window.addEventListener('click', onClick, false); window.addEventListener('mouseover', onMouseOver, false); window.addEventListener('mouseout', onMouseOut, false); window.addEventListener('keydown', onKeyDown, false); window.addEventListener('transitionend', onTransitionEnd, false); // When closing, navigate to main including its 'trigger pending uninstall'. window.addEventListener('unload', navigateToMainMenu, false);
<<<<<<< // original settings saved for use when eDec, scaleDivisor & nSep options are being used settings = originalSettings(settings); ======= // original settings saved for use when eDec & nSep options are being used keepOriginalSettings(settings); >>>>>>> // original settings saved for use when eDec, scaleDivisor & nSep options are being used keepOriginalSettings(settings); <<<<<<< settings.mDec = (settings.scaleDivisor && settings.scaleDecimal) ? settings.scaleDecimal : settings.mDec; // checks for non-supported input types if (!$input && $this.prop('tagName').toLowerCase() === 'input') { throwError(`The input type "${$this.prop('type')}" is not supported by autoNumeric`, settings.debug); } // checks for non-supported tags if (!isInArray($this.prop('tagName').toLowerCase(), settings.tagList) && $this.prop('tagName').toLowerCase() !== 'input') { throwError(`The <${$this.prop('tagName').toLowerCase()}> tag is not supported by autoNumeric`, settings.debug); } //TODO Replace the two next tests with a `validateOptions()` function // checks if the decimal and thousand are characters are the same if (settings.aDec === settings.aSep) { throwError(`autoNumeric will not function properly when the decimal character aDec [${settings.aDec}] and the thousand separator aSep [${settings.aSep}] are the same character`, settings.debug); } // checks the extended decimal places "eDec" is greater than the normal decimal places "mDec" if (settings.eDec < settings.mDec && settings.eDec !== null) { throwError(`autoNumeric will not function properly when the extended decimal places eDec [${settings.eDec}] is greater than the mDec [${settings.mDec}] value`, settings.debug); } ======= >>>>>>> settings.mDec = (settings.scaleDivisor && settings.scaleDecimal) ? settings.scaleDecimal : settings.mDec; <<<<<<< ======= * Note: setting aPad to 'false' will override the 'mDec' setting. * >>>>>>> * Note: setting aPad to 'false' will override the 'mDec' setting. * <<<<<<< //validate : an.validate(options) }; */ ======= }; >>>>>>> };
<<<<<<< return stripAllNonNumberCharacters(text, holder.settingsClone).replace(holder.settingsClone.decimalCharacter, '.'); ======= return autoStrip(text, holder.settingsClone, true).replace(holder.settingsClone.decimalCharacter, '.'); >>>>>>> return stripAllNonNumberCharacters(text, holder.settingsClone, true).replace(holder.settingsClone.decimalCharacter, '.' <<<<<<< function stripAllNonNumberCharacters(s, settings) { ======= function autoStrip(s, settings, leftOrAll) { >>>>>>> function stripAllNonNumberCharacters(s, settings, leftOrAll) { <<<<<<< inputValue = stripAllNonNumberCharacters(inputValue, settings); ======= inputValue = autoStrip(inputValue, settings, false); >>>>>>> inputValue = stripAllNonNumberCharacters(inputValue, settings, false); <<<<<<< left = stripAllNonNumberCharacters(left, this.settingsClone); right = stripAllNonNumberCharacters(right, this.settingsClone); ======= left = autoStrip(left, this.settingsClone, true); right = autoStrip(right, this.settingsClone, false); >>>>>>> left = stripAllNonNumberCharacters(left, this.settingsClone, true); right = stripAllNonNumberCharacters(right, this.settingsClone, false); <<<<<<< left = stripAllNonNumberCharacters(left, settingsClone); ======= left = autoStrip(left, settingsClone, true); if (Number(left) === 0 && settingsClone.leadingZero === 'deny') { if (right === '' && left.indexOf('-') === -1) { left = ''; } if (right !== '' && left.indexOf('-') !== -1) { left = '-'; } } >>>>>>> left = stripAllNonNumberCharacters(left, settingsClone, true); if (Number(left) === 0 && settingsClone.leadingZero === 'deny') { if (right === '') { left = ''; } else { if (contains(left, '-')) { left = '-'; } else { left = ''; } } } <<<<<<< right = stripAllNonNumberCharacters(right, settingsClone); ======= right = autoStrip(right, settingsClone, false); >>>>>>> right = stripAllNonNumberCharacters(right, settingsClone, false); <<<<<<< const modifiedLeftPart = left.substr(0, oldParts[0].length) + stripAllNonNumberCharacters(left.substr(oldParts[0].length), this.settingsClone); ======= const modifiedLeftPart = left.substr(0, oldParts[0].length) + autoStrip(left.substr(oldParts[0].length), this.settingsClone, true); >>>>>>> const modifiedLeftPart = left.substr(0, oldParts[0].length) + stripAllNonNumberCharacters(left.substr(oldParts[0].length), this.settingsClone, true); <<<<<<< } else if ((result = stripAllNonNumberCharacters(e.target.value, settings)) !== settings.rawValue) { ======= } else if ((result = autoStrip(e.target.value, settings, true)) !== settings.rawValue) { >>>>>>> } else if ((result = stripAllNonNumberCharacters(e.target.value, settings, true)) !== settings.rawValue) { <<<<<<< value = stripAllNonNumberCharacters(value, settings); ======= value = autoStrip(value, settings, true); >>>>>>> value = stripAllNonNumberCharacters(value, settings, true); <<<<<<< settings.rawValue = ((settings.negativePositiveSignPlacement === 's' || (settings.currencySymbolPlacement === 's' && settings.negativePositiveSignPlacement !== 'p')) && settings.negativeSignCharacter !== '' && contains(currentValue, '-'))?'-' + stripAllNonNumberCharacters(toStrip, settings):stripAllNonNumberCharacters(toStrip, settings); ======= settings.rawValue = ((settings.negativePositiveSignPlacement === 's' || (settings.currencySymbolPlacement === 's' && settings.negativePositiveSignPlacement !== 'p')) && settings.negativeSignCharacter !== '' && contains(currentValue, '-'))?'-' + autoStrip(toStrip, settings, true):autoStrip(toStrip, settings, true); >>>>>>> settings.rawValue = ((settings.negativePositiveSignPlacement === 's' || (settings.currencySymbolPlacement === 's' && settings.negativePositiveSignPlacement !== 'p')) && settings.negativeSignCharacter !== '' && contains(currentValue, '-'))?'-' + stripAllNonNumberCharacters(toStrip, settings, true):stripAllNonNumberCharacters(toStrip, settings, true); <<<<<<< value = stripAllNonNumberCharacters(value, settings); ======= value = autoStrip(value, settings, true); >>>>>>> value = stripAllNonNumberCharacters(value, settings, true);
<<<<<<< $scope.overlay = {}; $scope.overlay.show = true; $scope.overlay.view = umbRequestHelper.convertVirtualToAbsolutePath( "~/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html"); $scope.overlay.editorName = $scope.control.editor.name; $scope.overlay.allowedDocTypes = $scope.control.editor.config.allowedDocTypes || []; $scope.overlay.nameTemplate = $scope.control.editor.config.nameTemplate; $scope.overlay.dialogData = { docTypeAlias: $scope.control.value.dtgeContentTypeAlias, value: $scope.control.value.value }; $scope.overlay.close = function (oldModel) { $scope.overlay.show = false; $scope.overlay = null; } $scope.overlay.submit = function (newModel) { // Copy property values to scope model value if (newModel.node) { var value = { name: newModel.editorName }; for (var t = 0; t < newModel.node.tabs.length; t++) { var tab = newModel.node.tabs[t]; for (var p = 0; p < tab.properties.length; p++) { var prop = tab.properties[p]; if (typeof prop.value !== "function") { value[prop.alias] = prop.value; } } } if (newModel.nameExp) { var newName = newModel.nameExp(value); // Run it against the stored dictionary value, NOT the node object if (newName && (newName = $.trim(newName))) { value.name = newName; } } newModel.dialogData.value = value; } else { newModel.dialogData.value = null; ======= dtgeDialogService.open({ editorName: $scope.control.editor.name, allowedDocTypes: $scope.control.editor.config.allowedDocTypes || [], nameTemplate: $scope.control.editor.config.nameTemplate, dialogData: { docTypeAlias: $scope.control.value.dtgeContentTypeAlias, value: $scope.control.value.value, id: $scope.control.value.id }, callback: function (data) { $scope.setValue({ dtgeContentTypeAlias: data.docTypeAlias, value: data.value, id: data.id }); $scope.setPreview($scope.control.value); >>>>>>> $scope.overlay = {}; $scope.overlay.show = true; $scope.overlay.view = umbRequestHelper.convertVirtualToAbsolutePath( "~/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html"); $scope.overlay.editorName = $scope.control.editor.name; $scope.overlay.allowedDocTypes = $scope.control.editor.config.allowedDocTypes || []; $scope.overlay.nameTemplate = $scope.control.editor.config.nameTemplate; $scope.overlay.dialogData = { docTypeAlias: $scope.control.value.dtgeContentTypeAlias, value: $scope.control.value.value, id: $scope.control.value.id }; $scope.overlay.close = function (oldModel) { $scope.overlay.show = false; $scope.overlay = null; } $scope.overlay.submit = function (newModel) { // Copy property values to scope model value if (newModel.node) { var value = { name: newModel.editorName }; for (var t = 0; t < newModel.node.tabs.length; t++) { var tab = newModel.node.tabs[t]; for (var p = 0; p < tab.properties.length; p++) { var prop = tab.properties[p]; if (typeof prop.value !== "function") { value[prop.alias] = prop.value; } } } if (newModel.nameExp) { var newName = newModel.nameExp(value); // Run it against the stored dictionary value, NOT the node object if (newName && (newName = $.trim(newName))) { value.name = newName; } } newModel.dialogData.value = value; } else { newModel.dialogData.value = null;
<<<<<<< scalarRasterView.updateScene(gl_state, raster, { ...options, sealevel: world.hydrosphere.sealevel.value(), displacement: world.lithosphere.displacement.value(), world_radius: world.radius, }); ======= scalarRasterView.updateScene(scene, raster, Object.assign({ sealevel: world.hydrosphere.sealevel.value(), displacement: world.lithosphere.displacement.value(), }, options)); >>>>>>> scalarRasterView.updateScene(gl_state, raster, Object.assign({ sealevel: world.hydrosphere.sealevel.value(), displacement: world.lithosphere.displacement.value(), world_radius: world.radius, }, options));
<<<<<<< ======= raster = raster || Float32Raster.FromExample(raster); if (!(raster instanceof Float32Array)) { throw "raster" + ' is not a ' + "Float32Array"; } >>>>>>> raster = raster || Float32Raster.FromExample(raster); <<<<<<< ======= raster = raster || VectorRaster.FromExample(vector_raster); if ((vector_raster.everything === void 0) || !(vector_raster.everything instanceof Float32Array)) { throw "vector_raster" + ' is not a vector raster'; } >>>>>>> raster = raster || VectorRaster.FromExample(vector_raster); <<<<<<< Float32RasterInterpolation.lerp = function(a,b, x, result){ result = result || Float32Raster(x.grid); ======= Float32RasterInterpolation.mix = function(a,b, x, result){ if (!(x instanceof Float32Array)) { throw "x" + ' is not a ' + "Float32Array"; } result = result || Float32Raster.FromExample(x); if (!(result instanceof Float32Array)) { throw "result" + ' is not a ' + "Float32Array"; } >>>>>>> Float32RasterInterpolation.mix = function(a,b, x, result){ result = result || Float32Raster.FromExample(x); <<<<<<< Float32RasterInterpolation.lerp_fsf = function(a,b, x, result){ result = result || Float32Raster(x.grid); ======= Float32RasterInterpolation.mix_fsf = function(a,b, x, result){ if (!(a instanceof Float32Array)) { throw "a" + ' is not a ' + "Float32Array"; } if (!(x instanceof Float32Array)) { throw "x" + ' is not a ' + "Float32Array"; } result = result || Float32Raster.FromExample(x); if (!(result instanceof Float32Array)) { throw "result" + ' is not a ' + "Float32Array"; } >>>>>>> Float32RasterInterpolation.mix_fsf = function(a,b, x, result){ result = result || Float32Raster.FromExample(x); <<<<<<< Float32RasterInterpolation.lerp_sff = function(a,b, x, result){ result = result || Float32Raster(x.grid); ======= Float32RasterInterpolation.mix_sff = function(a,b, x, result){ if (!(b instanceof Float32Array)) { throw "b" + ' is not a ' + "Float32Array"; } if (!(x instanceof Float32Array)) { throw "x" + ' is not a ' + "Float32Array"; } result = result || Float32Raster.FromExample(x); if (!(result instanceof Float32Array)) { throw "result" + ' is not a ' + "Float32Array"; } >>>>>>> Float32RasterInterpolation.mix_sff = function(a,b, x, result){ result = result || Float32Raster.FromExample(x); <<<<<<< result = result || Float32Raster(x.grid); ======= if (!(x instanceof Float32Array)) { throw "x" + ' is not a ' + "Float32Array"; } result = result || Float32Raster.FromExample(x); if (!(result instanceof Float32Array)) { throw "result" + ' is not a ' + "Float32Array"; } >>>>>>> result = result || Float32Raster.FromExample(x); <<<<<<< result = result || Float32Raster(x.grid); var fraction; var inverse_edge_distance = 1 / (edge1 - edge0); ======= if (!(x instanceof Float32Array)) { throw "x" + ' is not a ' + "Float32Array"; } result = result || Float32Raster.FromExample(x); if (!(result instanceof Float32Array)) { throw "result" + ' is not a ' + "Float32Array"; } var inverse_edge_distance = 1 / (edge1 - edge0); var fraction = 0.; var linearstep = 0.; >>>>>>> result = result || Float32Raster.FromExample(x); var inverse_edge_distance = 1 / (edge1 - edge0); var fraction = 0.; var linearstep = 0.; <<<<<<< Float32RasterInterpolation.smooth_heaviside = function(x, k, result) { result = result || Float32Raster(x.grid); ======= // NOTE: you probably don't want to use this - you should use "smoothstep", instead // smoothstep is faster, and it uses more intuitive parameters // smoothstep2 is only here to support legacy behavior Float32RasterInterpolation.smoothstep2 = function(x, k, result) { if (!(x instanceof Float32Array)) { throw "x" + ' is not a ' + "Float32Array"; } result = result || Float32Raster.FromExample(x); if (!(result instanceof Float32Array)) { throw "result" + ' is not a ' + "Float32Array"; } >>>>>>> // NOTE: you probably don't want to use this - you should use "smoothstep", instead // smoothstep is faster, and it uses more intuitive parameters // smoothstep2 is only here to support legacy behavior Float32RasterInterpolation.smoothstep2 = function(x, k, result) { result = result || Float32Raster.FromExample(x);
<<<<<<< ======= var j = Math.floor(random.random()*vertices.length); >>>>>>> <<<<<<< this.crust.create(plate.get(i), this.OCEAN, this.LAND_CRUST_DENSITY); ======= this.crust.create(nearest.get(i), this.OCEAN, this.OCEAN_CRUST_DENSITY); >>>>>>> this.crust.create(plate.get(i), this.OCEAN, this.OCEAN_CRUST_DENSITY);
<<<<<<< eztz.node.query('/injection/block?chain='+bb.chain_id, bb.data).then(function(hash){ ======= injectedBlocks.push(bb.level); eztz.node.query('/injection/block?chain='+bb.chain_id, bb.data).then(function(hash){ >>>>>>> injectedBlocks.push(bb.level); eztz.node.query('/injection/block?chain='+bb.chain_id, bb.data).then(function(hash){ <<<<<<< eztz.node.query('/chains/'+head.chain_id+'/blocks/'+head.hash+'/helpers/baking_rights?level='+(head.header.level+1)+"&delegate="+keys.pkh).then(function(r){ if (r.length <= 0){ bakedBlocks.push((head.header.level+1)); return "Nothing to bake this level"; } else if (dateToTime(getDateNow()) >= (dateToTime(r[0].estimated_time)-(window.CONSTANTS.block_time/5)) && r[0].level == (head.header.level+1)){ bakedBlocks.push((head.header.level+1)); logOutput("-Trying to bake "+r[0].level+"/"+r[0].priority+"... ("+r[0].estimated_time+")"); return bake(keys, head, r[0].priority, r[0].estimated_time).then(function(r){ pendingBlocks.push(r); return "-Added potential bake for level " + (head.header.level+1); }).catch(function(e){ //TODO: Add retry //bakedBlocks.splice(bakedBlocks.indexOf(head.header.level+1), 1); return "-Couldn't bake " + (head.header.level+1); }); } else { return false } }).then(function(r){ if (r) logOutput(r); return r; }).catch(function(e){ logOutput("!Error", e); }); ======= (function(h){ eztz.node.query('/chains/'+h.chain_id+'/blocks/'+h.hash+'/helpers/baking_rights?level='+(h.header.level+1)+"&delegate="+keys.pkh).then(function(r){ if (h.header.level != head.header.level) { logOutput("Head changed!"); return; } if (bakedBlocks.indexOf(h.header.level+1) < 0){ if (r.length <= 0){ bakedBlocks.push((h.header.level+1)); return "Nothing to bake this level"; } else if (dateToTime(getDateNow()) >= (dateToTime(r[0].estimated_time)-(window.CONSTANTS.block_time/4)) && r[0].level == (h.header.level+1)){ bakedBlocks.push((h.header.level+1)); logOutput("-Trying to bake "+r[0].level+"/"+r[0].priority+"... ("+r[0].estimated_time+")"); return bake(keys, h, r[0].priority, r[0].estimated_time).then(function(r){ pendingBlocks.push(r); return "-Added potential bake for level " + (h.header.level+1); }).catch(function(e){ //TODO: Add retry //bakedBlocks.splice(bakedBlocks.indexOf(head.header.level+1), 1); return "-Couldn't bake " + (h.header.level+1); }); } else { return false } } }).then(function(r){ if (r) logOutput(r); return r; }).catch(function(e){ logOutput("!Error", e); }); }(head)); >>>>>>> (function(h){ eztz.node.query('/chains/'+h.chain_id+'/blocks/'+h.hash+'/helpers/baking_rights?level='+(h.header.level+1)+"&delegate="+keys.pkh).then(function(r){ if (h.header.level != head.header.level) { logOutput("Head changed!"); return; } if (bakedBlocks.indexOf(h.header.level+1) < 0){ if (r.length <= 0){ bakedBlocks.push((h.header.level+1)); return "Nothing to bake this level"; } else if (dateToTime(getDateNow()) >= (dateToTime(r[0].estimated_time)-(window.CONSTANTS.block_time/4)) && r[0].level == (h.header.level+1)){ bakedBlocks.push((h.header.level+1)); logOutput("-Trying to bake "+r[0].level+"/"+r[0].priority+"... ("+r[0].estimated_time+")"); return bake(keys, h, r[0].priority, r[0].estimated_time).then(function(r){ pendingBlocks.push(r); return "-Added potential bake for level " + (h.header.level+1); }).catch(function(e){ //TODO: Add retry return "-Couldn't bake " + (h.header.level+1); }); } else { return false } } }).then(function(r){ if (r) logOutput(r); return r; }).catch(function(e){ logOutput("!Error", e); }); }(head)); <<<<<<< return eztz.node.query('/chains/'+head.chain_id+'/'+window.CONSTANTS.mempool).then(function(r){ logOutput(r); var addedOps = []; ======= return eztz.node.query('/chains/'+head.chain_id+'/mempool').then(function(r){ var addedOps = [], endorsements = [], transactions = []; >>>>>>> return eztz.node.query('/chains/'+head.chain_id+'/mempool').then(function(r){ var addedOps = [], endorsements = [], transactions = []; <<<<<<< powLoop(forged, priority, seed_hex, function(blockbytes, att){ ======= console.log(forged); powLoop(forged, priority, seed_hex, 0, function(blockbytes, pdd, att){ >>>>>>> powLoop(forged, priority, seed_hex, function(blockbytes, att){ <<<<<<< function powLoop(forged, priority, seed_hex, cb){ var pdd = createProtocolData(priority, '0000000000000000', seed_hex), blockbytes = forged + pdd, hashBuffer = eztz.utility.hex2buf(blockbytes + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), forgedLength = forged.length/2, priorityLength = 2, protocolOffset = forgedLength + priorityLength, powLength = 8, syncBatchSize = 2000; (function powLoopHelper(att, syncAtt) { att++; syncAtt++; for (var i = 0; i < powLength; i++) { hashBuffer[protocolOffset+i] = Math.floor(Math.random()*256); } if (checkHash(hashBuffer)) { var hex = eztz.utility.buf2hex(hashBuffer); hex = hex.substr(0, hex.length-128); console.log(hex); cb(hex, att); } else { if (syncAtt < syncBatchSize) { powLoopHelper(att, syncAtt); } else { setImmediate(powLoopHelper, att, 0); } } })(0, 0); ======= function powLoop(forged, priority, seed_hex, att, cb){ var pdd = createProtocolData(priority, eztz.utility.hexNonce(16), seed_hex); var blockbytes = forged + pdd; att++; if (checkHash(blockbytes + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")) { cb(blockbytes, pdd, att); } else { setImmediate(powLoop, forged, priority, seed_hex, att, cb); } >>>>>>> function powLoop(forged, priority, seed_hex, cb){ var pdd = createProtocolData(priority, '0000000000000000', seed_hex), blockbytes = forged + pdd, hashBuffer = eztz.utility.hex2buf(blockbytes + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), forgedLength = forged.length/2, priorityLength = 2, protocolOffset = forgedLength + priorityLength, powLength = 8, syncBatchSize = 2000; (function powLoopHelper(att, syncAtt) { att++; syncAtt++; for (var i = 0; i < powLength; i++) { hashBuffer[protocolOffset+i] = Math.floor(Math.random()*256); } if (checkHash(hashBuffer)) { var hex = eztz.utility.buf2hex(hashBuffer); hex = hex.substr(0, hex.length-128); console.log(hex); cb(hex, att); } else { if (syncAtt < syncBatchSize) { powLoopHelper(att, syncAtt); } else { setImmediate(powLoopHelper, att, 0); } } })(0, 0); <<<<<<< ======= //Utility Functions >>>>>>> //Utility Functions
<<<<<<< var material = new THREE.ShaderMaterial({ attributes: { displacement: { type: 'f', value: null }, scalar: { type: 'f', value: null } }, uniforms: { reference_distance: { type: 'f', value: options.reference_distance || Units.EARTH_RADIUS }, world_radius: { type: 'f', value: options.world_radius || Units.EARTH_RADIUS }, sealevel: { type: 'f', value: 0 }, ocean_visibility: { type: 'f', value: options.ocean_visibility }, map_projection_offset: { type: 'f', value: options.map_projection_offset }, }, blending: THREE.NoBlending, vertexShader: options.vertexShader, fragmentShader: fragmentShader }); return new THREE.Mesh( geometry, material); } function update_vertex_shader(value) { if (vertexShader !== value) { vertexShader = value; mesh.material.vertexShader = value; mesh.material.needsUpdate = true; } } function update_uniform(key, value) { if (uniforms[key] !== value) { uniforms[key] = value; mesh.material.uniforms[key].value = value; mesh.material.uniforms[key].needsUpdate = true; } } function update_attribute(key, raster) { Float32Raster.get_ids(raster, raster.grid.buffer_array_to_cell, mesh.geometry.attributes[key].array); mesh.geometry.attributes[key].needsUpdate = true; } ======= var material = new THREE.ShaderMaterial({ attributes: { displacement: { type: 'f', value: null }, scalar: { type: 'f', value: null } }, uniforms: { sealevel: { type: 'f', value: options.sealevel }, sealevel_mod: { type: 'f', value: options.sealevel_mod }, index: { type: 'f', value: options.index }, }, blending: THREE.NoBlending, vertexShader: options.vertexShader, fragmentShader: fragmentShader }); return new THREE.Mesh( geometry, material); } function update_vertex_shader(value) { if (vertexShader !== value) { vertexShader = value; mesh.material.vertexShader = value; mesh.material.needsUpdate = true; } } function update_uniform(key, value) { if (uniforms[key] !== value) { uniforms[key] = value; mesh.material.uniforms[key].value = value; mesh.material.uniforms[key].needsUpdate = true; } } function update_attribute(key, raster) { Float32Raster.get_ids(raster, raster.grid.buffer_array_to_cell, mesh.geometry.attributes[key].array); mesh.geometry.attributes[key].needsUpdate = true; } >>>>>>> var material = new THREE.ShaderMaterial({ attributes: { displacement: { type: 'f', value: null }, scalar: { type: 'f', value: null } }, uniforms: { reference_distance: { type: 'f', value: options.reference_distance || Units.EARTH_RADIUS }, world_radius: { type: 'f', value: options.world_radius || Units.EARTH_RADIUS }, sealevel: { type: 'f', value: options.sealevel }, ocean_visibility: { type: 'f', value: options.ocean_visibility }, map_projection_offset: { type: 'f', value: options.map_projection_offset }, }, blending: THREE.NoBlending, vertexShader: options.vertexShader, fragmentShader: fragmentShader }); return new THREE.Mesh( geometry, material); } function update_vertex_shader(value) { if (vertexShader !== value) { vertexShader = value; mesh.material.vertexShader = value; mesh.material.needsUpdate = true; } } function update_uniform(key, value) { if (uniforms[key] !== value) { uniforms[key] = value; mesh.material.uniforms[key].value = value; mesh.material.uniforms[key].needsUpdate = true; } } function update_attribute(key, raster) { Float32Raster.get_ids(raster, raster.grid.buffer_array_to_cell, mesh.geometry.attributes[key].array); mesh.geometry.attributes[key].needsUpdate = true; } <<<<<<< if (mesh === void 0) { mesh = create_mesh(scaled_raster, options); uniforms = {...options}; vertexShader = options.vertexShader; gl_state.scene.add(mesh); ======= if (mesh === void 0) { mesh = create_mesh(scaled_raster, options); uniforms = Object.assign({}, options); vertexShader = options.vertexShader; scene.add(mesh); >>>>>>> if (mesh === void 0) { mesh = create_mesh(scaled_raster, options); uniforms = Object.assign({}, options); vertexShader = options.vertexShader; gl_state.scene.add(mesh);
<<<<<<< * Safely map a fullpath to a file in set1 to set2 * * @param {String} file1 - Full path to file * @param {String} id2 - Identifier of the right directory */ function mapFileToSet(file1, id2) { var dir = path.dirname(file1); var file = path.basename(file1); var page = path.basename(dir); var size = path.basename(path.resolve(dir, '../')); var base = path.resolve(dir, '../../../'); return [base, id2, size, page, file].join('/'); } /** * Returns the dimensions of an image file * * @todo Refactor execSync to spawnSync * @param {String} file - The full path to an image file * @returns {[Number, Number] | Boolean} */ function getImageSize(file) { var config = argumentLoader.getConfig(); var command = util.format( '"%s" -ping -format "%w %h" "%s"', util.escape(config.im + 'identify'), util.escape(file)); try { var sizes = child_process.execSync(command, { encoding: 'utf8' }); return sizes.trim().split(' ').map(num => parseInt(num, 10)); } catch (e) { return false; } } /** * Is `file1` smaller than `file2` in image dimensions? * * @param {[Number, Number]} sizes1 - Dimensions of the left file * @param {[Number, Number]} sizes2 - Dimensions of the right file * @returns {Boolean} */ function isSmallest(sizes1, sizes2) { return (sizes1[0] * sizes1[1]) < (sizes2[0] * sizes2[1]); } /** * Resize an image to specified dimensions * * @todo Refactor execSync to spawnSync * @param {String} file - Left filename * @param {[Number, Number]} sizes - Dimensions of the left file * @throws {Error} * @returns {String} - The filename of the just created file */ function resizeTo(file, sizes) { var config = argumentLoader.getConfig(); var imConvert = config.im + 'convert'; var newName = file + '.tmp.png'; var newSizes = sizes[0] + 'x' + sizes[1]; log.verbose("Resizing '" + path.relative(process.cwd(), file) + "' to " + newSizes); var command = util.format( '"%s" "%s" -background transparent -extent %s "%s"', util.escape(imConvert), util.escape(file), newSizes, util.escape(newName)); child_process.execSync(command); return newName; } /** ======= >>>>>>> * Safely map a fullpath to a file in set1 to set2 * * @param {String} file1 - Full path to file * @param {String} id2 - Identifier of the right directory */ function mapFileToSet(file1, id2) { var dir = path.dirname(file1); var file = path.basename(file1); var page = path.basename(dir); var size = path.basename(path.resolve(dir, '../')); var base = path.resolve(dir, '../../../'); return [base, id2, size, page, file].join('/'); } /**
<<<<<<< var fn = module.exports.getHandler(module.exports.botController.hears); var botReply = fn.__bot.reply.args[0][1]; if(typeof botReply === 'object' && botReply.text) { botReply = botReply.text; } ======= var botReply = module.exports.botController.hears.__bot.reply.args[0][1]; >>>>>>> var botReply = module.exports.botController.hears.__bot.reply.args[0][1]; if(typeof botReply === 'object' && botReply.text) { botReply = botReply.text; }
<<<<<<< ======= page.canvas.setSize(page.width, page.height); page.lastUsed = new Date(); this.activePage = page; // this.sayDocumentChanged(); >>>>>>>
<<<<<<< newPage.canvas = null; this.retrievePageCanvas(newPage); // if (!this.canvasPool.available()) { // console.log("No available canvas for swapping in, swapping a LRU page now."); // var lruPage = null; // var lru = new Date().getTime(); // for (var i = 0; i < this.doc.pages.length; i++) { // var p = this.doc.pages[i]; // if (!p.canvas) continue; // if (p.lastUsed.getTime() < lru ) { // lruPage = p; // lru = p.lastUsed.getTime(); // } // } // if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; // console.log("Found LRU page: " + lruPage.name); // this.swapOut(lruPage); // } // var canvas = this.canvasPool.obtain(); // this.swapIn(newPage, canvas); // if(!page.canvas) { // var pageIncavans = this.canvasPool.obtain(); // if (!this.canvasPool.available()) { // console.log("No available canvas for swapping in, swapping a LRU page now."); // var lruPage = null; // var lru = new Date().getTime(); // for (var i = 0; i < this.doc.pages.length; i++) { // var p = this.doc.pages[i]; // if (!p.canvas) continue; // if (p.lastUsed.getTime() < lru ) { // lruPage = p; // lru = p.lastUsed.getTime(); // } // } // if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; // console.log("Found LRU page: " + lruPage.name); // this.swapOut(lruPage); // } // this.swapIn(page, pageIncavans); // } this.retrievePageCanvas(page); ======= if (!this.canvasPool.available()) { console.log("No available canvas for swapping in, swapping a LRU page now."); var lruPage = null; var lru = new Date().getTime(); for (var i = 0; i < this.doc.pages.length; i++) { var p = this.doc.pages[i]; if (!p.canvas) continue; // if (!p.lastUsed) { // lruPage = p; // break; // } if (p.lastUsed.getTime() < lru) { lruPage = p; lru = p.lastUsed.getTime(); } } this.swapOut(lruPage); } var canvas = this.canvasPool.obtain(); this.swapIn(newPage, canvas); if (!page.canvas) { if (!this.canvasPool.available()) { console.log("No available canvas for swapping in, swapping a LRU page now."); var lruPage = null; var lru = new Date().getTime(); for (var i = 0; i < this.doc.pages.length; i++) { var p = this.doc.pages[i]; if (!p.canvas || p == newPage) continue; // if (!p.lastUsed) { // lruPage = p; // break; // } if (p.lastUsed.getTime() < lru) { lruPage = p; lru = p.lastUsed.getTime(); } } this.swapOut(lruPage); } var pageIncavans = this.canvasPool.obtain(); this.swapIn(page, pageIncavans); } >>>>>>> newPage.canvas = null; this.retrievePageCanvas(newPage); // if (!this.canvasPool.available()) { // console.log("No available canvas for swapping in, swapping a LRU page now."); // var lruPage = null; // var lru = new Date().getTime(); // for (var i = 0; i < this.doc.pages.length; i++) { // var p = this.doc.pages[i]; // if (!p.canvas) continue; // if (p.lastUsed.getTime() < lru ) { // lruPage = p; // lru = p.lastUsed.getTime(); // } // } // if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; // console.log("Found LRU page: " + lruPage.name); // this.swapOut(lruPage); // } // var canvas = this.canvasPool.obtain(); // this.swapIn(newPage, canvas); // if(!page.canvas) { // var pageIncavans = this.canvasPool.obtain(); // if (!this.canvasPool.available()) { // console.log("No available canvas for swapping in, swapping a LRU page now."); // var lruPage = null; // var lru = new Date().getTime(); // for (var i = 0; i < this.doc.pages.length; i++) { // var p = this.doc.pages[i]; // if (!p.canvas) continue; // if (p.lastUsed.getTime() < lru ) { // lruPage = p; // lru = p.lastUsed.getTime(); // } // } // if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; // console.log("Found LRU page: " + lruPage.name); // this.swapOut(lruPage); // } // this.swapIn(page, pageIncavans); // } this.retrievePageCanvas(page); <<<<<<< ======= this.swapOut(page); >>>>>>> this.swapOut(page); <<<<<<< this.saveDocumentImpl(this.documentPath, onSaved); }; Controller.prototype.saveDocumentImpl = function (documentPath, onSaved) { ======= >>>>>>> this.saveDocumentImpl(this.documentPath, onSaved); }; Controller.prototype.saveDocumentImpl = function (documentPath, onSaved) { <<<<<<< if(page != this.activePage) { // if (!page.canvas) { // console.log("Page is not in memory, swapping in now"); // if (!this.canvasPool.available()) { // console.log("No available canvas for swapping in, swapping a LRU page now."); // var lruPage = null; // var lru = new Date().getTime(); // for (var i = 0; i < this.doc.pages.length; i ++) { // var p = this.doc.pages[i]; // if (!p.canvas) continue; // if (p.lastUsed.getTime() < lru) { // lruPage = p; // lru = p.lastUsed.getTime(); // } // } // // if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; // console.log("Found LRU page: " + lruPage.name); // this.swapOut(lruPage); // } // // var canvas = this.canvasPool.obtain(); // this.swapIn(page, canvas); // } this.retrievePageCanvas(page); ======= if (page != this.activePage) { if (!page.canvas) { console.log("Page is not in memory, swapping in now"); if (!this.canvasPool.available()) { console.log("No available canvas for swapping in, swapping a LRU page now."); var lruPage = null; var lru = new Date().getTime(); for (var i = 0; i < this.doc.pages.length; i ++) { var p = this.doc.pages[i]; if (!p.canvas) continue; if (p.lastUsed.getTime() < lru) { lruPage = p; lru = p.lastUsed.getTime(); } } if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; console.log("Found LRU page: " + lruPage.name); this.swapOut(lruPage); } var canvas = this.canvasPool.obtain(); this.swapIn(page, canvas); } >>>>>>> if (page != this.activePage) { // if (!page.canvas) { // console.log("Page is not in memory, swapping in now"); // if (!this.canvasPool.available()) { // console.log("No available canvas for swapping in, swapping a LRU page now."); // var lruPage = null; // var lru = new Date().getTime(); // for (var i = 0; i < this.doc.pages.length; i ++) { // var p = this.doc.pages[i]; // if (!p.canvas) continue; // if (p.lastUsed.getTime() < lru) { // lruPage = p; // lru = p.lastUsed.getTime(); // } // } // // if (!lruPage) throw "Invalid state. Unable to find LRU page to swap out"; // console.log("Found LRU page: " + lruPage.name); // this.swapOut(lruPage); // } // // var canvas = this.canvasPool.obtain(); // this.swapIn(page, canvas); // } this.retrievePageCanvas(page);
<<<<<<< ======= /** * Initialize feedbacks * @param {Function} callback - Callback function **/ Countly.get_available_feedback_widgets = function(callback) { if (!Countly.check_consent("feedback")) { if (callback) { callback(null, new Error("Consent for feedback not provided.")); } return; } if (offlineMode) { log("Cannot enable feedback in offline mode."); return; } var url = Countly.url + readPath; var data = { method: "feedback", device_id: Countly.device_id, app_key: Countly.app_key }; sendXmlHttpRequest(url, data, function(err, params, responseText){ if(err) { log("Error occured while fetching feedbacks", err); if (callback) { callback(null, err); } return; } try { var response = JSON.parse(responseText); var feedbacks = response.result || []; if (callback) { callback(feedbacks, null); } return; } catch (error) { log("Error while processing feedbacks", error); if (callback) { callback(null, error); } return; } }); }; /** * Present the feedback widget in webview * @param {Object} presentableFeedback - Current presentable feedback **/ Countly.present_feedback_widget = function (presentableFeedback) { if (!Countly.check_consent("feedback")) { return; } if (!presentableFeedback || (typeof presentableFeedback !== "object") || Array.isArray(presentableFeedback) ) { log("Please provide atleast one feedback widget object."); return; } try { var url = Countly.url; if (presentableFeedback.type === "nps") { url += "/feedback/nps"; } else if (presentableFeedback.type === "survey") { url += "/feedback/survey"; } else { log("Feedback widget only accepts nps and survey types."); return; } url += "?widget_id=" + presentableFeedback._id; url += "&app_key=" + Countly.app_key; url += "&device_id=" + Countly.device_id; url += "&sdk_name=" + SDK_NAME; url += "&platform=" + Countly.platform; url += "&app_version=" + Countly.app_version; url += "&sdk_version=" + SDK_VERSION; //Only web SDK passes origin and web url += "&origin=" + window.origin; url += "&web=true"; //Origin is passed to the popup so that it passes it back in the postMessage event var iframe = document.createElement("iframe"); iframe.name = "countly-surveys-iframe"; iframe.id = "countly-surveys-iframe"; iframe.src = url; // iframe.onload = function() { // document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "none"; // document.getElementById('csbg').style.display = "none"; // } loadCSS(Countly.url + '/surveys/stylesheets/countly-surveys.css'); var overlay = document.getElementById("csbg"); while (overlay) { //Remove any existing overlays overlay.remove(); overlay = document.getElementById("csbg"); } var wrapper = document.getElementsByClassName("countly-surveys-wrapper"); for(var i = 0; i < wrapper.length; i++) { //Remove any existing feedback wrappers wrapper[i].remove(); } document.body.insertAdjacentHTML('beforeend', '<div id="csbg"></div>'); wrapper = document.createElement("div"); wrapper.className = 'countly-surveys-wrapper'; wrapper.id = 'countly-surveys-wrapper-' + presentableFeedback._id; if (presentableFeedback.type === "survey") { //Set popup position wrapper.className = wrapper.className + " " + presentableFeedback.appearance.position; } document.body.appendChild(wrapper); wrapper.appendChild(iframe); add_event(window, "message", function(e) { var data = {}; try { data = JSON.parse(e.data); } catch(e) { log("Error while parsing message body " + e); } if((e.origin !== Countly.url) || !(data.close)) { return; } document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "none"; document.getElementById('csbg').style.display = "none"; }); if (presentableFeedback.type === "survey") { var surveyShown = false; //Set popup show policy switch(presentableFeedback.exitPolicy) { case "afterPageLoad": add_event(window, "load", function(){ if (!surveyShown) { surveyShown = true; document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "block"; document.getElementById('csbg').style.display = "block"; } }); break; case "afterConstantDelay": setTimeout(function() { if (!surveyShown) { surveyShown = true; document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "block"; document.getElementById('csbg').style.display = "block"; } }, 10000); break; case "onAbandon": add_event(window, "load", function(){ add_event(document, "mouseleave", function() { if (!surveyShown) { surveyShown = true; document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "block"; document.getElementById('csbg').style.display = "block"; } }); }); break; case "onScrollHalfwayDown": add_event(window, "scroll", function() { if (!surveyShown) { var scrollY = Math.max(window.scrollY, document.body.scrollTop, document.documentElement.scrollTop); var documentHeight = getDocHeight(); if (scrollY >= (documentHeight/2)) { surveyShown = true; document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "block"; document.getElementById('csbg').style.display = "block"; } } }); break; default: if (!surveyShown) { surveyShown = true; document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "block"; document.getElementById('csbg').style.display = "block"; } } } else if (presentableFeedback.type === "nps") { document.getElementById('countly-surveys-wrapper-' + presentableFeedback._id).style.display = "block"; document.getElementById('csbg').style.display = "block"; } } catch (e) { log("Somethings went wrong while presenting the feedback", e); } }; >>>>>>>
<<<<<<< exports.BemCreateNode = INHERIT(GeneratedFileNode, { nodeType: 5, ======= >>>>>>> nodeType: 5,
<<<<<<< opts.output.write('exports.blocks = ' + JSON.stringify(decl1) + ';\n'); }); ======= opts.output.write(deps.stringify(res)); }) >>>>>>> opts.output.write(deps.stringify(res)); });
<<<<<<< depsCount2, i = 10; return Q.when(this.expandOnceByFS()).then(function again(newDeps) { ======= depsCount2; return _this.expandOnceByFS().then(function again(newDeps) { >>>>>>> depsCount2; return Q.when(this.expandOnceByFS()).then(function again(newDeps) {
<<<<<<< type: 'stopover', stop: stations[parseInt(st.locX)] || null, ======= station: locations[parseInt(st.locX)] || null, >>>>>>> stop: locations[parseInt(st.locX)] || null,
<<<<<<< it('should catch thrown exceptions', async () => { // given const workerNodes = givenWorkerPoolWith('harmful-module', { maxWorkers: 1, taskMaxRetries: 0 }); // when const result = await workerNodes.call.throwsAlways().catch(error => error); // then result.should.be .an.instanceOf(Error) .that.has.property('message', 'thrown'); }); it('should catch rejected promises', async () => { // given const workerNodes = givenWorkerPoolWith('harmful-module', { maxWorkers: 1, taskMaxRetries: 0 }); // when const result = await workerNodes.call.rejectAlways().catch(error => error); // then result.should.be .an.instanceOf(Error) .that.has.property('message', 'rejected'); }); it('should be successful if previously failing task would reconsider its behaviour', async () => { ======= it('should catch thrown exceptions', function* () { // given const workerNodes = givenWorkerPoolWith('harmful-module', { maxWorkers: 1, taskMaxRetries: 0 }); // when const result = yield workerNodes.call.throwsAlways().catch(error => error); // then result.should.be .an.instanceOf(Error) .that.has.property('message', 'thrown'); }); it('should catch rejected promises', function* () { // given const workerNodes = givenWorkerPoolWith('harmful-module', { maxWorkers: 1, taskMaxRetries: 0 }); // when const result = yield workerNodes.call.rejectAlways().catch(error => error); // then result.should.be .an.instanceOf(Error) .that.has.property('message', 'rejected'); }); it('should be successful if previously failing task would reconsider its behaviour', function* () { >>>>>>> it('should catch thrown exceptions', function* () { // given const workerNodes = givenWorkerPoolWith('harmful-module', { maxWorkers: 1, taskMaxRetries: 0 }); // when const result = yield workerNodes.call.throwsAlways().catch(error => error); // then result.should.be .an.instanceOf(Error) .that.has.property('message', 'thrown'); }); it('should catch rejected promises', async () => { // given const workerNodes = givenWorkerPoolWith('harmful-module', { maxWorkers: 1, taskMaxRetries: 0 }); // when const result = await workerNodes.call.rejectAlways().catch(error => error); // then result.should.be .an.instanceOf(Error) .that.has.property('message', 'rejected'); }); it('should be successful if previously failing task would reconsider its behaviour', async () => {
<<<<<<< else if (el instanceof HTMLParagraphElement && el.innerHTML.trim() === "") return; else if (el instanceof HTMLDivElement && !$(el).hasClass('article-alignC')) return; else content.appendChild(el.cloneNode(true)); }) ======= else if (this instanceof HTMLParagraphElement && this.innerHTML.trim() === "") return; else if (this instanceof HTMLDivElement && !$(this).hasClass('article-alignC')) return; else content.appendChild(this.cloneNode(true)); }); >>>>>>> else if (el instanceof HTMLParagraphElement && el.innerHTML.trim() === "") return; else if (el instanceof HTMLDivElement && !$(el).hasClass('article-alignC')) return; else content.appendChild(el.cloneNode(true)); }); <<<<<<< $('.article-control-menu .date span').forEach(function (el, i) { var match = el.innerText.match(/(등록|수정)\s*:\s+(\d{4}\.\d{2}\.\d{2}\s+\d{1,2}:\d{1,2})/); if (match == null) return; ======= $('.article-control-menu .date span').each(function () { var match = this.innerText.match(/(등록|수정)\s*:\s+(\d{4}\.\d{2}\.\d{2}\s+\d{1,2}:\d{1,2})/); if (match === null) return; >>>>>>> $('.article-control-menu .date span').forEach(function (el, i) { var match = el.innerText.match(/(등록|수정)\s*:\s+(\d{4}\.\d{2}\.\d{2}\s+\d{1,2}:\d{1,2})/); if (match === null) return;
<<<<<<< function OptionsNodeList(vOptions) { var pOptions = this._getOptionObjects(vOptions); NodeList.call(this, pOptions, Option); } Core.extend(OptionsNodeList, NodeList); ======= br.presenter.node.OptionsNodeList = function(options) { var options = this._getOptionObjects(options); br.presenter.node.NodeList.call(this, options, br.presenter.node.Option); }; br.Core.extend(br.presenter.node.OptionsNodeList, br.presenter.node.NodeList); >>>>>>> function OptionsNodeList(vOptions) { var options = this._getOptionObjects(vOptions); NodeList.call(this, options, Option); } Core.extend(OptionsNodeList, NodeList); <<<<<<< OptionsNodeList.prototype.getOptions = function() { ======= br.presenter.node.OptionsNodeList.prototype.getOptions = function() { >>>>>>> OptionsNodeList.prototype.getOptions = function() { <<<<<<< OptionsNodeList.prototype.setOptions = function(vOptions) { this.updateList(vOptions); ======= br.presenter.node.OptionsNodeList.prototype.setOptions = function(options) { this.updateList(options); >>>>>>> OptionsNodeList.prototype.setOptions = function(options) { this.updateList(options); <<<<<<< OptionsNodeList.prototype.getFirstOption = function() { var pOptions = this.getOptions(); if (pOptions.length == 0) { ======= br.presenter.node.OptionsNodeList.prototype.getFirstOption = function() { var options = this.getOptions(); if (options.length == 0) { >>>>>>> OptionsNodeList.prototype.getFirstOption = function() { var options = this.getOptions(); if (options.length == 0) { <<<<<<< OptionsNodeList.prototype.getOptionByLabel = function(sLabel) { var pNodes = this.getOptions(); for (var i = 0, max = pNodes.length; i < max; i++) { if (pNodes[i].label.getValue() === sLabel) { return pNodes[i]; ======= br.presenter.node.OptionsNodeList.prototype.getOptionByLabel = function(label, ignoreCase) { if (typeof ignoreCase === 'undefined') { ignoreCase = false; } if (typeof ignoreCase !== 'boolean') { throw new Error("'ignoreCase' argument must be a Boolean value"); } var nodes = this.getOptions(); var labelToCompareWith = label; if (ignoreCase) { labelToCompareWith = label.toLowerCase(); } function getNodeValue(node) { if (ignoreCase) { return node.label.getValue().toLowerCase(); } else { return node.label.getValue(); } } for (var i = 0, max = nodes.length; i < max; i++) { if (getNodeValue(nodes[i]) === labelToCompareWith) { return nodes[i]; >>>>>>> OptionsNodeList.prototype.getOptionByLabel = function(label, ignoreCase) { if (typeof ignoreCase === 'undefined') { ignoreCase = false; } if (typeof ignoreCase !== 'boolean') { throw new Error("'ignoreCase' argument must be a Boolean value"); } var nodes = this.getOptions(); var labelToCompareWith = label; if (ignoreCase) { labelToCompareWith = label.toLowerCase(); } function getNodeValue(node) { if (ignoreCase) { return node.label.getValue().toLowerCase(); } else { return node.label.getValue(); } } for (var i = 0, max = nodes.length; i < max; i++) { if (getNodeValue(nodes[i]) === labelToCompareWith) { return nodes[i]; <<<<<<< if (Object.prototype.toString.call(vOptions) === '[object Array]') { for (var i = 0; i < vOptions.length; i++) { if (vOptions[i] instanceof Option) { pResult.push(vOptions[i]); } else { var option = new Option(vOptions[i], vOptions[i]); pResult.push(option); ======= if (options instanceof Array) { for (var i = 0, len = options.length; i < len; i++) { if (options[i] instanceof br.presenter.node.Option) { result.push(options[i]); } else { option = new br.presenter.node.Option(options[i],options[i]); result.push(option); >>>>>>> if (options instanceof Array) { for (var i = 0, len = options.length; i < len; i++) { if (options[i] instanceof Option) { result.push(options[i]); } else { option = new Option(options[i],options[i]); result.push(option);
<<<<<<< numbers.useless = require('./numbers/useless'); numbers.random = require('./numbers/random'); ======= numbers.generate = require('./numbers/generators'); >>>>>>> numbers.generate = require('./numbers/generators'); numbers.random = require('./numbers/random');
<<<<<<< describe('custom replacers', () => { it('sets $CHANGES based on all commits, and $PREVIOUS_TAG to blank', async () => { getConfigMock('config-with-replacers.yml') nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) .get('/repos/toolmantim/release-drafter-test-project/commits') .query(true) .reply(200, require('./fixtures/commits')) nock('https://api.github.com') .get('/repos/toolmantim/release-drafter-test-project/pulls/1') .reply(200, require('./fixtures/pull-request-1.json')) .get('/repos/toolmantim/release-drafter-test-project/pulls/2') .reply(200, require('./fixtures/pull-request-2.json')) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Integrate alien technology (#1000) @another-user * More cowbell (#1) @toolmantim `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) ======= describe('merging strategies', () => { describe('merge commit', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock() nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-merge-commit.json')) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Fixed a bug (#4) @TimonVS * Implement homepage (#3) @TimonVS * Add Prettier config (#2) @TimonVS * Add EditorConfig (#1) @TimonVS `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) describe('rebase merging', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock() nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply( 200, require('./fixtures/graphql-commits-rebase-merging.json') ) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Fixed a bug (#4) @TimonVS * Implement homepage (#3) @TimonVS * Add Prettier config (#2) @TimonVS * Add EditorConfig (#1) @TimonVS `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) describe('squash merging', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock() nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-squash.json')) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Fixed a bug (#4) @TimonVS * Implement homepage (#3) @TimonVS * Add Prettier config (#2) @TimonVS * Add EditorConfig (#1) @TimonVS `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) }) describe('pagination', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock('config.yml') nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-paginated-1.json')) .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-paginated-2.json')) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Added great distance (#16) @toolmantim * Oh hai (#15) @toolmantim * ❤️ Add MOAR THINGS (#14) @toolmantim * Add all the tests (#13) @toolmantim * 🤖 Add robots (#12) @toolmantim * 🎃 More pumpkins (#11) @toolmantim * 🐄 Moar cowbell (#10) @toolmantim * 1️⃣ Switch to a monorepo (#9) @toolmantim * 👽 Integrate Alien technology (#8) @toolmantim * Add ⛰ technology (#7) @toolmantim * 👽 Added alien technology (#6) @toolmantim * 🙅🏼‍♂️ 🐄 (#5) @toolmantim * 🐄 More cowbell (#4) @toolmantim * 🐒 Add monkeys technology (#3) @toolmantim * Adds a new Widgets API (#2) @toolmantim * Create new-feature.md (#1) @toolmantim `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) >>>>>>> describe('merging strategies', () => { describe('merge commit', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock() nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-merge-commit.json')) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Fixed a bug (#4) @TimonVS * Implement homepage (#3) @TimonVS * Add Prettier config (#2) @TimonVS * Add EditorConfig (#1) @TimonVS `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) describe('rebase merging', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock() nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply( 200, require('./fixtures/graphql-commits-rebase-merging.json') ) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Fixed a bug (#4) @TimonVS * Implement homepage (#3) @TimonVS * Add Prettier config (#2) @TimonVS * Add EditorConfig (#1) @TimonVS `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) describe('squash merging', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock() nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-squash.json')) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Fixed a bug (#4) @TimonVS * Implement homepage (#3) @TimonVS * Add Prettier config (#2) @TimonVS * Add EditorConfig (#1) @TimonVS `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) }) describe('pagination', () => { it('sets $CHANGES based on all commits', async () => { getConfigMock('config.yml') nock('https://api.github.com') .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-paginated-1.json')) .post('/graphql', body => body.query.includes('query findCommitsWithAssociatedPullRequests') ) .reply(200, require('./fixtures/graphql-commits-paginated-2.json')) nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Added great distance (#16) @toolmantim * Oh hai (#15) @toolmantim * ❤️ Add MOAR THINGS (#14) @toolmantim * Add all the tests (#13) @toolmantim * 🤖 Add robots (#12) @toolmantim * 🎃 More pumpkins (#11) @toolmantim * 🐄 Moar cowbell (#10) @toolmantim * 1️⃣ Switch to a monorepo (#9) @toolmantim * 👽 Integrate Alien technology (#8) @toolmantim * Add ⛰ technology (#7) @toolmantim * 👽 Added alien technology (#6) @toolmantim * 🙅🏼‍♂️ 🐄 (#5) @toolmantim * 🐄 More cowbell (#4) @toolmantim * 🐒 Add monkeys technology (#3) @toolmantim * Adds a new Widgets API (#2) @toolmantim * Create new-feature.md (#1) @toolmantim `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) }) describe('custom replacers', () => { it('sets $CHANGES based on all commits, and $PREVIOUS_TAG to blank', async () => { getConfigMock('config-with-replacers.yml') nock('https://api.github.com') .get( '/repos/toolmantim/release-drafter-test-project/releases?per_page=100' ) .reply(200, []) .get('/repos/toolmantim/release-drafter-test-project/commits') .query(true) .reply(200, require('./fixtures/commits')) nock('https://api.github.com') .get('/repos/toolmantim/release-drafter-test-project/pulls/1') .reply(200, require('./fixtures/pull-request-1.json')) .get('/repos/toolmantim/release-drafter-test-project/pulls/2') .reply(200, require('./fixtures/pull-request-2.json')) nock('https://api.github.com') .post( '/repos/toolmantim/release-drafter-test-project/releases', body => { expect(body).toMatchObject({ body: `# What's Changed * Integrate alien technology (#1000) @another-user * More cowbell (#1) @toolmantim `, draft: true, tag_name: '' }) return true } ) .reply(200) const payload = require('./fixtures/push') await probot.receive({ name: 'push', payload }) expect.assertions(1) }) })
<<<<<<< case "document": // XMLHTTPRequest only :( ======= case ResponseType_1.ResponseType.DOCUMENT: >>>>>>> case ResponseType_1.ResponseType.DOCUMENT: // XMLHTTPRequest only :(
<<<<<<< var RequestMethod_1 = require("./RequestMethod"); var packageInfo = require('../../package.json'); ======= >>>>>>> var RequestMethod_1 = require("./RequestMethod"); var packageInfo = require('../../package.json'); <<<<<<< GraphRequest.prototype.configureRequest = function (request, accessToken) { var _this = this; request.headers.append('Authorization', 'Bearer ' + accessToken); request.headers.append('SdkVersion', "graph-js-" + packageInfo.version); Object.keys(this._headers).forEach(function (key) { return request.headers.set(key, _this._headers[key]); }); ======= GraphRequest.prototype.configureRequest = function (requestBuilder, accessToken) { var request = requestBuilder .set('Authorization', 'Bearer ' + accessToken) .set(this._headers) .set('SdkVersion', "graph-js-" + common_1.PACKAGE_VERSION); if (this._responseType !== undefined) { request.responseType(this._responseType); } >>>>>>> GraphRequest.prototype.configureRequest = function (request, accessToken) { var _this = this; request.headers.append('Authorization', 'Bearer ' + accessToken); request.headers.append('SdkVersion', "graph-js-" + common_1.PACKAGE_VERSION); Object.keys(this._headers).forEach(function (key) { return request.headers.set(key, _this._headers[key]); });
<<<<<<< // Variable used for enabling profiling in Production // passed into alias object. Uses a flag if passed into the build command const isEnvProductionProfile = isEnvProduction && process.argv.includes('--profile'); ======= const workspacesMainFields = [ workspacesConfig.packageEntry, 'browser', 'module', 'main', ]; const mainFields = isEnvDevelopment && workspacesConfig.development ? workspacesMainFields : isEnvProduction && workspacesConfig.production ? workspacesMainFields : undefined; const includePaths = isEnvDevelopment && workspacesConfig.development ? [paths.appSrc, ...workspacesConfig.paths] : isEnvProduction && workspacesConfig.production ? [paths.appSrc, ...workspacesConfig.paths] : paths.appSrc; >>>>>>> // Variable used for enabling profiling in Production // passed into alias object. Uses a flag if passed into the build command const isEnvProductionProfile = isEnvProduction && process.argv.includes('--profile'); const workspacesMainFields = [ workspacesConfig.packageEntry, 'browser', 'module', 'main', ]; const mainFields = isEnvDevelopment && workspacesConfig.development ? workspacesMainFields : isEnvProduction && workspacesConfig.production ? workspacesMainFields : undefined; const includePaths = isEnvDevelopment && workspacesConfig.development ? [paths.appSrc, ...workspacesConfig.paths] : isEnvProduction && workspacesConfig.production ? [paths.appSrc, ...workspacesConfig.paths] : paths.appSrc; <<<<<<< ======= watch: includePaths, >>>>>>> watch: includePaths,
<<<<<<< it('should not mark query parameters as required by default', function(done) { var definition = [ '#%RAML 0.2', '---', 'title: Title', 'baseUri: http://server/api', '/:', ' get:', ' queryParameters:', ' notRequired:', ' type: integer' ].join('\n'); var expected = { title: 'Title', baseUri: 'http://server/api', resources: [ { relativeUri: '/', methods: [ { method: 'get', queryParameters: { notRequired: { type: 'integer', displayName: 'notRequired' } } } ] } ] } raml.load(definition).should.become(expected).and.notify(done); }) it('should mark query parameters as required when explicitly requested', function(done) { var definition = [ '#%RAML 0.2', '---', 'title: Title', 'baseUri: http://server/api', '/:', ' get:', ' queryParameters:', ' mustBeRequired:', ' type: integer', ' required: true' ].join('\n'); var expected = { title: 'Title', baseUri: 'http://server/api', resources: [ { relativeUri: '/', methods: [ { method: 'get', queryParameters: { mustBeRequired: { type: 'integer', displayName: 'mustBeRequired', required: true } } } ] } ] } raml.load(definition).should.become(expected).and.notify(done); }) ======= it('should report error that contains URI inside', function(done) { var uri = 'http://localhost:9001/invalid/url'; var definition = [ '#%RAML 0.2', '---', 'title: !include ' + uri ].join('\n'); raml.load(definition).should.be.rejected.with(uri).and.notify(done); }); it('should report correct line/column for unavailable file in !include', function(done) { var noop = function () {}; var definition = [ '#%RAML 0.2', '---', 'title: !include unavailable.raml' ].join('\n'); raml.load(definition).then(noop, function (error) { setTimeout(function () { expect(error.problem_mark).to.exist; error.problem_mark.line.should.be.equal(2); error.problem_mark.column.should.be.equal(7); done(); }, 0); }); }); it('should report correct line/column for unavailable URI in !include', function(done) { var noop = function () {}; var definition = [ '#%RAML 0.2', '---', 'title: !include http://localhost:9001/invalid/url' ].join('\n'); raml.load(definition).then(noop, function (error) { setTimeout(function () { expect(error.problem_mark).to.exist; error.problem_mark.line.should.be.equal(2); error.problem_mark.column.should.be.equal(7); done(); }, 0); }); }); >>>>>>> it('should not mark query parameters as required by default', function(done) { var definition = [ '#%RAML 0.2', '---', 'title: Title', 'baseUri: http://server/api', '/:', ' get:', ' queryParameters:', ' notRequired:', ' type: integer' ].join('\n'); var expected = { title: 'Title', baseUri: 'http://server/api', resources: [ { relativeUri: '/', methods: [ { method: 'get', queryParameters: { notRequired: { type: 'integer', displayName: 'notRequired' } } } ] } ] } raml.load(definition).should.become(expected).and.notify(done); }) it('should mark query parameters as required when explicitly requested', function(done) { var definition = [ '#%RAML 0.2', '---', 'title: Title', 'baseUri: http://server/api', '/:', ' get:', ' queryParameters:', ' mustBeRequired:', ' type: integer', ' required: true' ].join('\n'); var expected = { title: 'Title', baseUri: 'http://server/api', resources: [ { relativeUri: '/', methods: [ { method: 'get', queryParameters: { mustBeRequired: { type: 'integer', displayName: 'mustBeRequired', required: true } } } ] } ] } raml.load(definition).should.become(expected).and.notify(done); }); it('should report error that contains URI inside', function(done) { var uri = 'http://localhost:9001/invalid/url'; var definition = [ '#%RAML 0.2', '---', 'title: !include ' + uri ].join('\n'); raml.load(definition).should.be.rejected.with(uri).and.notify(done); }); it('should report correct line/column for unavailable file in !include', function(done) { var noop = function () {}; var definition = [ '#%RAML 0.2', '---', 'title: !include unavailable.raml' ].join('\n'); raml.load(definition).then(noop, function (error) { setTimeout(function () { expect(error.problem_mark).to.exist; error.problem_mark.line.should.be.equal(2); error.problem_mark.column.should.be.equal(7); done(); }, 0); }); }); it('should report correct line/column for unavailable URI in !include', function(done) { var noop = function () {}; var definition = [ '#%RAML 0.2', '---', 'title: !include http://localhost:9001/invalid/url' ].join('\n'); raml.load(definition).then(noop, function (error) { setTimeout(function () { expect(error.problem_mark).to.exist; error.problem_mark.line.should.be.equal(2); error.problem_mark.column.should.be.equal(7); done(); }, 0); }); });
<<<<<<< it('should allow protocols at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - HTTP', ' - HTTPS' ].join('\n')).should.be.fulfilled.and.notify(done); }); it('should fail if protocols property is not a sequence at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols: HTTP, HTTPS' ].join('\n')).should.be.rejected.with('property must be a sequence').and.notify(done); }); it('should fail if protocols property contains not-a-string values at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - {}' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('value must be a string'); error.problem_mark.line.should.be.equal(5); error.problem_mark.column.should.be.equal(5); done(); }, 0); }); }); it('should fail if protocols property contains invalid values at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - HTTP', ' - FTP' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('only HTTP and HTTPS values are allowed'); error.problem_mark.line.should.be.equal(6); error.problem_mark.column.should.be.equal(5); done(); }, 0); }); }); it('should not allow valid protocols in mixed cases at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - HtTp', ' - hTtPs' ].join('\n')).should.be.rejected.with('only HTTP and HTTPS values are allowed').and.notify(done); }); it('should allow protocols at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - HTTP', ' - HTTPS' ].join('\n')).should.be.fulfilled.and.notify(done); }); it('should fail if protocols property is not a sequence at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols: HTTP, HTTPS' ].join('\n')).should.be.rejected.with('property must be a sequence').and.notify(done); }); it('should fail if protocols property contains not-a-string values at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - {}' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('value must be a string'); error.problem_mark.line.should.be.equal(7); error.problem_mark.column.should.be.equal(13); done(); }, 0); }); }); it('should fail if protocols property contains invalid values at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - HTTP', ' - FTP' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('only HTTP and HTTPS values are allowed'); error.problem_mark.line.should.be.equal(8); error.problem_mark.column.should.be.equal(13); done(); }, 0); }); }); it('should not allow valid protocols in mixed cases at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - HtTp' ].join('\n')).should.be.rejected.with('only HTTP and HTTPS values are allowed').and.notify(done); }); it('should allow protocols in traits', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'traits:', ' - trait1:', ' protocols:', ' - HTTP' ].join('\n')).should.be.fulfilled.and.notify(done); }); it('should not allow protocols in resources', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' protocols:', ' - HTTP' ].join('\n')).should.be.rejected.with('property: \'protocols\' is invalid in a resource').and.notify(done); }); ======= it('should not allow parameters to be used as a name for trait', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'traits:', ' - <<traitName>>: {}' ].join('\n')).should.be.rejected.with('parameter key cannot be used as a trait name').and.notify(done); }); it('should not allow parameters to be used as a name for resource type', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'resourceTypes:', ' - <<resourceTypeName>>: {}' ].join('\n')).should.be.rejected.with('parameter key cannot be used as a resource type name').and.notify(done); }); >>>>>>> it('should allow protocols at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - HTTP', ' - HTTPS' ].join('\n')).should.be.fulfilled.and.notify(done); }); it('should fail if protocols property is not a sequence at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols: HTTP, HTTPS' ].join('\n')).should.be.rejected.with('property must be a sequence').and.notify(done); }); it('should fail if protocols property contains not-a-string values at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - {}' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('value must be a string'); error.problem_mark.line.should.be.equal(5); error.problem_mark.column.should.be.equal(5); done(); }, 0); }); }); it('should fail if protocols property contains invalid values at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - HTTP', ' - FTP' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('only HTTP and HTTPS values are allowed'); error.problem_mark.line.should.be.equal(6); error.problem_mark.column.should.be.equal(5); done(); }, 0); }); }); it('should not allow valid protocols in mixed cases at root level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'protocols:', ' - HtTp', ' - hTtPs' ].join('\n')).should.be.rejected.with('only HTTP and HTTPS values are allowed').and.notify(done); }); it('should allow protocols at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - HTTP', ' - HTTPS' ].join('\n')).should.be.fulfilled.and.notify(done); }); it('should fail if protocols property is not a sequence at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols: HTTP, HTTPS' ].join('\n')).should.be.rejected.with('property must be a sequence').and.notify(done); }); it('should fail if protocols property contains not-a-string values at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - {}' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('value must be a string'); error.problem_mark.line.should.be.equal(7); error.problem_mark.column.should.be.equal(13); done(); }, 0); }); }); it('should fail if protocols property contains invalid values at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - HTTP', ' - FTP' ].join('\n')).then(function () {}, function (error) { setTimeout(function () { error.message.should.contain('only HTTP and HTTPS values are allowed'); error.problem_mark.line.should.be.equal(8); error.problem_mark.column.should.be.equal(13); done(); }, 0); }); }); it('should not allow valid protocols in mixed cases at method level', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' get:', ' protocols:', ' - HtTp' ].join('\n')).should.be.rejected.with('only HTTP and HTTPS values are allowed').and.notify(done); }); it('should allow protocols in traits', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', 'traits:', ' - trait1:', ' protocols:', ' - HTTP' ].join('\n')).should.be.fulfilled.and.notify(done); }); it('should not allow protocols in resources', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'baseUri: http://api.com', '/:', ' protocols:', ' - HTTP' ].join('\n')).should.be.rejected.with('property: \'protocols\' is invalid in a resource').and.notify(done); }); it('should not allow parameters to be used as a name for resource type', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'resourceTypes:', ' - <<resourceTypeName>>: {}' ].join('\n')).should.be.rejected.with('parameter key cannot be used as a resource type name').and.notify(done); }); it('should not allow parameters to be used as a name for trait', function (done) { raml.load([ '#%RAML 0.8', '---', 'title: Example', 'traits:', ' - <<traitName>>: {}' ].join('\n')).should.be.rejected.with('parameter key cannot be used as a trait name').and.notify(done); });
<<<<<<< _this.valid_common_parameter_properties(uriParameter[1], allowParameterKeys); if (!(allowParameterKeys || (_ref2 = uriParameter[0].value, __indexOf.call(expressions, _ref2) >= 0))) { ======= if (!_this.isNullableMapping(uriParameter[1])) { throw new exports.ValidationError('while validating baseUri', null, 'parameter must be a mapping', uriParameter[0].start_mark); } if (!_this.isNull(uriParameter[1])) { _this.valid_common_parameter_properties(uriParameter[1]); } if (_ref2 = uriParameter[0].value, __indexOf.call(expressions, _ref2) < 0) { >>>>>>> if (!_this.isNullableMapping(uriParameter[1])) { throw new exports.ValidationError('while validating baseUri', null, 'parameter must be a mapping', uriParameter[0].start_mark); } if (!_this.isNull(uriParameter[1])) { _this.valid_common_parameter_properties(uriParameter[1], allowParameterKeys); } if (!(allowParameterKeys || (_ref2 = uriParameter[0].value, __indexOf.call(expressions, _ref2) >= 0))) { <<<<<<< this.check_is_map(node[1]); if (!node[1].value) { ======= if (!node.value) { >>>>>>> if (!node[1].value) { <<<<<<< if (allowParameterKeys && _this.isParameterKey(childNode)) { return; } if (_this.handleOptionals(allowParameterKeys, propertyName, { "displayName": function() { if (_this.isSequence(childNode[1]) || _this.isMapping(childNode[0])) { ======= switch (propertyName) { case "displayName": if (!_this.isScalar(childNode[1])) { >>>>>>> if (allowParameterKeys && _this.isParameterKey(childNode)) { return; } if (_this.handleOptionals(allowParameterKeys, propertyName, { "displayName": function() { if (!_this.isScalar(childNode[1])) { <<<<<<< }, "pattern": function() { if (_this.isSequence(childNode[1]) || _this.isMapping(childNode[0])) { ======= break; case "pattern": if (!_this.isScalar(childNode[1])) { >>>>>>> }, "pattern": function() { if (!_this.isScalar(childNode[1])) { <<<<<<< }, "default": function() { if (_this.isSequence(childNode[1]) || _this.isMapping(childNode[0])) { ======= break; case "default": if (!_this.isScalar(childNode[1])) { >>>>>>> }, "default": function() { if (!_this.isScalar(childNode[1])) { <<<<<<< }, "description": function() { if (_this.isSequence(childNode[1]) || _this.isMapping(childNode[0])) { ======= break; case "description": if (!_this.isScalar(childNode[1])) { >>>>>>> }, "description": function() { if (!_this.isScalar(childNode[1])) { <<<<<<< }, "example": function() { if (_this.isSequence(childNode[1]) || _this.isMapping(childNode[0])) { ======= break; case "example": if (!_this.isScalar(childNode[1])) { >>>>>>> }, "example": function() { if (!_this.isScalar(childNode[1])) { <<<<<<< break; ======= return _this.validate_uri_parameters(_this.baseUri, property[1]); case "securedBy": return _this.validate_secured_by(property); >>>>>>> break; case "securedBy": return _this.validate_secured_by(property); <<<<<<< if (_this.validate_common_properties(property, allowParameterKeys)) { return; } if (_this.handleOptionals(allowParameterKeys, property[0].value, { 'headers': function() { return _this.validate_headers(property, allowParameterKeys); }, 'queryParameters': function() { return _this.validate_query_params(property, allowParameterKeys); }, 'body': function() { return _this.validate_body(property, allowParameterKeys); } })) { return; } switch (property[0].value) { case "responses": return _this.validate_responses(property, allowParameterKeys); case "securedBy": if (!_this.isSequence(property[1])) { throw new exports.ValidationError('while validating resources', null, "property 'securedBy' must be a list", property[0].start_mark); } return property[1].value.forEach(function(secScheme) { var securitySchemeName; if (_this.isSequence(secScheme)) { throw new exports.ValidationError('while validating securityScheme consumption', null, 'securityScheme reference cannot be a list', secScheme.start_mark); } if (!_this.isNull(secScheme)) { securitySchemeName = _this.key_or_value(secScheme); if (!_this.get_security_scheme(securitySchemeName)) { throw new exports.ValidationError('while validating securityScheme consumption', null, 'there is no securityScheme named ' + securitySchemeName, secScheme.start_mark); } } }); default: throw new exports.ValidationError('while validating resources', null, "property: '" + property[0].value + ("' is invalid in a " + context), property[0].start_mark); ======= if (!_this.validate_common_properties(property, allowParameterKeys)) { switch (property[0].value) { case "headers": return _this.validate_headers(property, allowParameterKeys); case "queryParameters": return _this.validate_query_params(property, allowParameterKeys); case "body": return _this.validate_body(property, allowParameterKeys); case "responses": return _this.validate_responses(property, allowParameterKeys); case "securedBy": return _this.validate_secured_by(property); default: throw new exports.ValidationError('while validating resources', null, "property: '" + property[0].value + "' is invalid in a method", property[0].start_mark); } >>>>>>> if (_this.validate_common_properties(property, allowParameterKeys)) { return; } if (_this.handleOptionals(allowParameterKeys, property[0].value, { 'headers': function() { return _this.validate_headers(property, allowParameterKeys); }, 'queryParameters': function() { return _this.validate_query_params(property, allowParameterKeys); }, 'body': function() { return _this.validate_body(property, allowParameterKeys); } })) { return; } switch (property[0].value) { case "responses": return _this.validate_responses(property, allowParameterKeys); case "securedBy": return _this.validate_secured_by(property); default: throw new exports.ValidationError('while validating resources', null, "property: '" + property[0].value + ("' is invalid in a " + context), property[0].start_mark); <<<<<<< if (this.handleOptionals(allowParameterKeys, property[0].value, { "displayName": function() { if (!_this.isString(property[1])) { ======= switch (property[0].value) { case "displayName": if (!this.isScalar(property[1])) { >>>>>>> if (this.handleOptionals(allowParameterKeys, property[0].value, { "displayName": function() { if (!_this.isScalar(property[1])) {
<<<<<<< test('journeys – Spichernstr. to Bismarckstr.', co(function* (t) { const journeys = yield client.journeys(spichernstr, bismarckstr, { results: 3, when, passedStations: true ======= test('journeys – station to station', co(function* (t) { const journeys = yield client.journeys(spichernstr, amrumerStr, { results: 3, departure: when, passedStations: true >>>>>>> test('journeys – Spichernstr. to Bismarckstr.', co(function* (t) { const journeys = yield client.journeys(spichernstr, bismarckstr, { results: 3, departure: when, passedStations: true <<<<<<< address: '13353 Berlin-Wedding, Torfstr. 17', latitude: 52.541797, longitude: 13.350042 } const journeys = yield client.journeys(spichernstr, torfstr, { results: 3, when }) ======= address: 'Torfstr. 17, Berlin', latitude: 52.541797, longitude: 13.350042 }, {results: 1, departure: when}) t.ok(Array.isArray(journeys)) t.strictEqual(journeys.length, 1) const journey = journeys[0] const leg = journey.legs[journey.legs.length - 1] assertValidStation(t, leg.origin) assertValidStationProducts(t, leg.origin.products) assertValidWhen(t, leg.departure, when) const dest = leg.destination assertValidAddress(t, dest) t.strictEqual(dest.address, '13353 Berlin-Wedding, Torfstr. 17') t.ok(isRoughlyEqual(.0001, dest.latitude, 52.541797)) t.ok(isRoughlyEqual(.0001, dest.longitude, 13.350042)) assertValidWhen(t, leg.arrival, when) >>>>>>> address: '13353 Berlin-Wedding, Torfstr. 17', latitude: 52.541797, longitude: 13.350042 } const journeys = yield client.journeys(spichernstr, torfstr, { results: 3, departure: when }) <<<<<<< latitude: 52.543333, longitude: 13.351686 } const journeys = yield client.journeys(spichernstr, atze, { results: 3, when }) ======= latitude: 52.543333, longitude: 13.351686 }, {results: 1, departure: when}) t.ok(Array.isArray(journeys)) t.strictEqual(journeys.length, 1) const journey = journeys[0] const leg = journey.legs[journey.legs.length - 1] assertValidStation(t, leg.origin) assertValidStationProducts(t, leg.origin.products) assertValidWhen(t, leg.departure, when) const dest = leg.destination assertValidPoi(t, dest) t.strictEqual(dest.id, '900980720') t.strictEqual(dest.name, 'Berlin, Atze Musiktheater für Kinder') t.ok(isRoughlyEqual(.0001, dest.latitude, 52.543333)) t.ok(isRoughlyEqual(.0001, dest.longitude, 13.351686)) assertValidWhen(t, leg.arrival, when) >>>>>>> latitude: 52.543333, longitude: 13.351686 } const journeys = yield client.journeys(spichernstr, atze, { results: 3, departure: when }) <<<<<<< yield testJourneysWithDetour({ test: t, journeys, validate, detourIds: [württembergallee] ======= t.ok(journey) const l = journey.legs.some(l => l.passed && l.passed.some(p => p.station.id === württembergallee)) t.ok(l, 'Württembergalle is not being passed') t.end() })) test('journeys: via works – without detour', co(function* (t) { // When going from Ruhleben to Zoo via Kastanienallee, there is *no need* // to change trains / no need for a "detour". const ruhleben = '900000025202' const zoo = '900000023201' const kastanienallee = '900000020152' const [journey] = yield client.journeys(ruhleben, zoo, { via: kastanienallee, results: 1, departure: when, passedStations: true >>>>>>> yield testJourneysWithDetour({ test: t, journeys, validate, detourIds: [württembergallee]
<<<<<<< engine.setMaxListeners(25); engine.on(Engine.Events.EVENT, function(event, message) { ======= procEmitter.setMaxListeners(24); procEmitter.on(Engine.Events.EVENT, function(event, message) { >>>>>>> engine.setMaxListeners(25); engine.on(Engine.Events.EVENT, function(event, message) { <<<<<<< engine.execute(query, { request: holder }, function(emitter) { setupExecStateEmitter(emitter, execState, req.param('events')); setupCounters(emitter); emitter.on('end', function(err, results) { return handleResponseCB(req, res, execState, err, results); }) }) } ); } ======= emitter = new EventEmitter(); setupExecStateEmitter(emitter, execState, req.param('events')); setupCounters(emitter); engine.exec({ script: query, emitter: emitter, request: holder, cb: function(err, results) { return handleResponseCB(req, res, execState, err, results); } }); } ); >>>>>>> engine.execute(query, { request: holder }, function(emitter) { setupExecStateEmitter(emitter, execState, req.param('events')); setupCounters(emitter); emitter.on('end', function(err, results) { return handleResponseCB(req, res, execState, err, results); }) }) } ); } <<<<<<< ======= _.each(events, function(event) { emitter.on(event, _collect); }); setupCounters(emitter); >>>>>>> <<<<<<< engine.execute(script, {}, function(emitter) { _.each(events, function(event) { emitter.on(event, _collect); }); setupCounters(emitter); emitter.on('end', function(err, results) { if(err) { ======= engine.exec({ script: script, request: { headers: {}, params: {}, connection: { remoteAddress: connection.remoteAddress } }, emitter: emitter, cb: function(err, results) { if (err) { >>>>>>> engine.execute(script, { request: { headers: {}, params: {}, connection: { remoteAddress: connection.remoteAddress } } }, function(emitter) { _.each(events, function(event) { emitter.on(event, _collect); }); setupCounters(emitter); emitter.on('end', function(err, results) { if(err) { <<<<<<< if(process.send) { emitter.on(Engine.Events.SCRIPT_ACK, function(packet) { process.send({event: Engine.Events.SCRIPT_ACK, pid: process.pid}); }) emitter.on(Engine.Events.STATEMENT_REQUEST, function(packet) { process.send({event: Engine.Events.STATEMENT_REQUEST, pid: process.pid}); }) emitter.on(Engine.Events.STATEMENT_RESPONSE, function(packet) { process.send({event: Engine.Events.STATEMENT_RESPONSE, pid: process.pid}); }) emitter.on(Engine.Events.SCRIPT_DONE, function(packet) { process.send({event: Engine.Events.SCRIPT_DONE, pid: process.pid}); }) } } ======= emitter.on(Engine.Events.SCRIPT_ACK, function(packet) { // Emit an event for stats procEmitter.emit(Engine.Events.SCRIPT_ACK, packet); }); emitter.on(Engine.Events.STATEMENT_REQUEST, function(packet) { // Emit an event for stats procEmitter.emit(Engine.Events.STATEMENT_REQUEST, packet); }); emitter.on(Engine.Events.STATEMENT_RESPONSE, function(packet) { // Emit an event for stats procEmitter.emit(Engine.Events.STATEMENT_RESPONSE, packet); }); emitter.on(Engine.Events.SCRIPT_DONE, function(packet) { // Emit an event for stats procEmitter.emit(Engine.Events.SCRIPT_DONE, packet); }); } >>>>>>> if(process.send) { emitter.on(Engine.Events.SCRIPT_ACK, function(packet) { process.send({event: Engine.Events.SCRIPT_ACK, pid: process.pid}); }) emitter.on(Engine.Events.STATEMENT_REQUEST, function(packet) { process.send({event: Engine.Events.STATEMENT_REQUEST, pid: process.pid}); }) emitter.on(Engine.Events.STATEMENT_RESPONSE, function(packet) { process.send({event: Engine.Events.STATEMENT_RESPONSE, pid: process.pid}); }) emitter.on(Engine.Events.SCRIPT_DONE, function(packet) { process.send({event: Engine.Events.SCRIPT_DONE, pid: process.pid}); }) } }
<<<<<<< connect.bodyParser.parse['opaque'] = function(req, options, next) { var buf = ''; req.setEncoding('utf8'); req.on('data', function (chunk) { buf += chunk }); req.on('end', function () { try { req.body = buf; next(); } catch(err) { next(err); } }); }; // Add parser for multipart connect.bodyParser.parse['multipart/form-data'] = function(req, options, next) { var body, parts = [], idx = 0; var form = new formidable.IncomingForm(); ======= var multiParser = function(req, options, next) { var form = new formidable.IncomingForm(), parts = []; >>>>>>> connect.bodyParser.parse['opaque'] = function(req, options, next) { var buf = ''; req.setEncoding('utf8'); req.on('data', function (chunk) { buf += chunk }); req.on('end', function () { try { req.body = buf; next(); } catch(err) { next(err); } }); }; // Add parser for multipart var multiParser = function(req, options, next) { var form = new formidable.IncomingForm(), parts = [];
<<<<<<< // Attach a callback to the specified events ======= // Attach a callback to the specified events >>>>>>> // Attach a callback to the specified events <<<<<<< ======= // Find the size of the first matched element u.prototype.size = function(){ return this.first().getBoundingClientRect(); }; >>>>>>> // Find the size of the first matched element u.prototype.size = function(){ return this.first().getBoundingClientRect(); }; <<<<<<< // Call an event manually on all the nodes u.prototype.trigger = function(events, data) { this.eacharg(events, function(node, event){ // Allow the event to bubble up and to be cancelable (default) var ev, opts = { bubbles: true, cancelable: true, detail: data }; ======= // Call an event manually on all the nodes u.prototype.trigger = function(events, data) { this.eacharg(events, function(node, event){ // Allow the event to bubble up and to be cancelable (default) var ev, opts = { bubbles: true, cancelable: true, detail: data }; >>>>>>> // Call an event manually on all the nodes u.prototype.trigger = function(events, data) { this.eacharg(events, function(node, event){ // Allow the event to bubble up and to be cancelable (default) var ev, opts = { bubbles: true, cancelable: true, detail: data };
<<<<<<< init: function(events) { if (initComplete) { console.log('Rotate signed prekey listener: Already initialized'); return; } initComplete = true; if (Whisper.Registration.isDone()) { setTimeoutForNextRun(); ======= init: function(events, newVersion) { if (initComplete) { console.log('Rotate signed prekey listener: Already initialized'); return; >>>>>>> init: function(events) { if (initComplete) { console.log('Rotate signed prekey listener: Already initialized'); return;
<<<<<<< responseModelValidationLevel = /error|warn|fail/.test(cfg.validateResponseModels) ? cfg.validateResponseModels : 0; ======= responseModelValidationLevel = /error|warn/.test(cfg.validateResponseModels) ? cfg.validateResponseModels : 0; polymorphicValidation = (cfg.polymorphicValidation !== false);//default to true >>>>>>> responseModelValidationLevel = /error|warn|fail/.test(cfg.validateResponseModels) ? cfg.validateResponseModels : 0; polymorphicValidation = (cfg.polymorphicValidation !== false);//default to true <<<<<<< validationErrors = validateResponseModels(res, body, data, logger); if (validationErrors) { if (responseModelValidationLevel === 'error' || responseModelValidationLevel === 'fail') { //we're going to check the model and send any valdiation errors back to the caller in the reponse //either in the `_response_validation_errors` property of the response, or of that property of the first and last array entries //we'll create a response object (or array entry) if there isn't one (we will break some client code) ======= var validateResponse = validateResponseModels.bind({},res, body, data, logger, swaggerDoc); if (responseModelValidationLevel === 'error') { //we're going to check the model and send any valdiation errors back to the caller in the reponse //either in the `_response_validation_errors` property of the response, or of that property of the first and last array entries //we'll create a response object (or array entry) if there isn't one (we will break some client code) validationErrors = validateResponse(); if (validationErrors) { >>>>>>> validationErrors = validateResponseModels(res, body, data, logger); if (validationErrors) { if (responseModelValidationLevel === 'error' || responseModelValidationLevel === 'fail') { //we're going to check the model and send any valdiation errors back to the caller in the reponse //either in the `_response_validation_errors` property of the response, or of that property of the first and last array entries //we'll create a response object (or array entry) if there isn't one (we will break some client code) <<<<<<< ======= } //after this initial call (sometimes `send` will call itself again), we don't need to get the response for validation anymore res.send = responseSender; responseSender.call(res, isJson ? JSON.stringify(body): body); if (responseModelValidationLevel === 'warn') { //when doing a warning only, do the work after the response has already been sent validationErrors = validateResponse(); } if (validationErrors) { // for both errors and warnings ... >>>>>>>
<<<<<<< function sound_record(_args) { var win = Titanium.UI.createWindow({ title:_args.title }); ======= function sound_record() { var win = Titanium.UI.createWindow(); var currentSessionMode = Titanium.Media.audioSessionMode; >>>>>>> function sound_record(_args) { var win = Titanium.UI.createWindow({ title:_args.title }); var currentSessionMode = Titanium.Media.audioSessionMode;
<<<<<<< function tv_refresh() { var isMobileWeb = Ti.Platform.osname === 'mobileweb', isTizen = Ti.Platform.osname === 'tizen', win = Ti.UI.createWindow(); ======= function tv_refresh(_args) { var win = Ti.UI.createWindow({ title:_args.title }); >>>>>>> function tv_refresh(_args) { var isMobileWeb = Ti.Platform.osname === 'mobileweb', isTizen = Ti.Platform.osname === 'tizen', win = Ti.UI.createWindow({ title:_args.title });
<<<<<<< var isMobileWeb = Ti.Platform.osname === 'mobileweb', isTizen = Ti.Platform.osname === 'tizen', win = Titanium.UI.createWindow(); ======= var win = Titanium.UI.createWindow({ title:_args.title }); >>>>>>> var isMobileWeb = Ti.Platform.osname === 'mobileweb', isTizen = Ti.Platform.osname === 'tizen', win = Titanium.UI.createWindow({ title:_args.title }); <<<<<<< w = new Win(), b = Titanium.UI.createButton( {title: 'Close'} ); isTizen || (b.style = Titanium.UI.iPhone.SystemButtonStyle.PLAIN); w.title = 'Modal Window'; w.barColor = 'black'; isTizen ? w.add(b) : w.setLeftNavButton(b); b.addEventListener('click',function() { ======= w = new Win({title: 'Modal Window'}); w.barColor = 'black'; var b = Titanium.UI.createButton({ title:'Close', style:Titanium.UI.iPhone.SystemButtonStyle.PLAIN }); w.setLeftNavButton(b); b.addEventListener('click',function() { >>>>>>> w = new Win(), b = Titanium.UI.createButton( {title: 'Close'} ); isTizen || (b.style = Titanium.UI.iPhone.SystemButtonStyle.PLAIN); w.title = 'Modal Window'; w.barColor = 'black'; isTizen ? w.add(b) : w.setLeftNavButton(b); b.addEventListener('click',function() {
<<<<<<< distortion0: {type:"v4",value:tabIntr[0]}, distortion1: {type:"v4",value:tabIntr[1]}, distortion2: {type:"v4",value:tabIntr[2]}, distortion3: {type:"v4",value:tabIntr[3]}, distortion4: {type:"v4",value:tabIntr[4]}, ======= indice_time0:{type:'f',value:indice_time}, indice_time1:{type:'f',value:indice_time}, indice_time2:{type:'f',value:indice_time}, indice_time3:{type:'f',value:indice_time}, indice_time4:{type:'f',value:indice_time}, intrinsic0: {type:"v4",value:tabIntr[0]}, intrinsic1: {type:"v4",value:tabIntr[1]}, intrinsic2: {type:"v4",value:tabIntr[2]}, intrinsic3: {type:"v4",value:tabIntr[3]}, intrinsic4: {type:"v4",value:tabIntr[4]}, >>>>>>> indice_time0:{type:'f',value:indice_time}, indice_time1:{type:'f',value:indice_time}, indice_time2:{type:'f',value:indice_time}, indice_time3:{type:'f',value:indice_time}, indice_time4:{type:'f',value:indice_time}, distortion0: {type:"v4",value:tabIntr[0]}, distortion1: {type:"v4",value:tabIntr[1]}, distortion2: {type:"v4",value:tabIntr[2]}, distortion3: {type:"v4",value:tabIntr[3]}, distortion4: {type:"v4",value:tabIntr[4]}, <<<<<<< textureMask0: {type: 't',value: Ori.getMask(0) }, textureMask1: {type: 't',value: Ori.getMask(1)}, textureMask2: {type: 't',value: Ori.getMask(2)}, textureMask3: {type: 't',value: Ori.getMask(3)}, textureMask4: {type: 't',value: Ori.getMask(4)} ======= texture0bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[0]) }, texture1bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[1])}, texture2bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[2])}, texture3bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[3])}, texture4bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[4])} >>>>>>> texture0bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[0])}, texture1bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[1])}, texture2bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[2])}, texture3bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[3])}, texture4bis: {type: 't',value: THREE.ImageUtils.loadTexture(tabUrl[4])}, textureMask0: {type: 't',value: Ori.getMask(0)}, textureMask1: {type: 't',value: Ori.getMask(1)}, textureMask2: {type: 't',value: Ori.getMask(2)}, textureMask3: {type: 't',value: Ori.getMask(3)}, textureMask4: {type: 't',value: Ori.getMask(4)}
<<<<<<< uniforms.alpha.value[j] = 1-pano; ======= uniforms.mask.value[j] = Ori.getMask(i); uniforms.alpha.value[j] = _alpha*(1-pano); >>>>>>> uniforms.alpha.value[j] = _alpha*(1-pano); <<<<<<< console.log(uniforms.mask.value); // create the shader material for Three _shaderMat = new THREE.ShaderMaterial({ uniforms: uniforms, vertexShader: Shader.shaderTextureProjectiveVS(P*N), fragmentShader: Shader.shaderTextureProjectiveFS(P*N,idmask), side: THREE.BackSide, transparent:true }); for (var i=0; i<N; ++i) { var m= idmask[i]; if(m>=0) { this.loadTexture(Ori.getMask(i), function(tex,m) { _shaderMat.uniforms.mask.value[m] = tex; }, m); } var panoUrl = panoInfo.url_format.replace("{cam_id_pos}",Ori.sensors[i].infos.cam_id_pos); this.loadTexture(panoUrl, function(tex,i) { _shaderMat.uniforms.texture.value[i] = tex; }, i); } return _shaderMat; }, ======= // create the shader material for Three _shaderMat = new THREE.ShaderMaterial({ uniforms: uniforms, vertexShader: Shader.shaderTextureProjectiveVS(P*N), fragmentShader: Shader.shaderTextureProjectiveFS(P*N), side: THREE.BackSide, transparent:false }); return _shaderMat; }, >>>>>>> // create the shader material for Three _shaderMat = new THREE.ShaderMaterial({ uniforms: uniforms, vertexShader: Shader.shaderTextureProjectiveVS(P*N), fragmentShader: Shader.shaderTextureProjectiveFS(P*N,idmask), side: THREE.BackSide, transparent:true }); for (var i=0; i<N; ++i) { var m= idmask[i]; if(m>=0) { this.loadTexture(Ori.getMask(i), function(tex,m) { _shaderMat.uniforms.mask.value[m] = tex; }, m); } var panoUrl = panoInfo.url_format.replace("{cam_id_pos}",Ori.sensors[i].infos.cam_id_pos); this.loadTexture(panoUrl, function(tex,i) { _shaderMat.uniforms.texture.value[i] = tex; }, i); } return _shaderMat; }, <<<<<<< _shaderMat.uniforms.mvpp.value[j] = _shaderMat.uniforms.mvpp.value[i]; _shaderMat.uniforms.translation.value[j] = _shaderMat.uniforms.translation.value[i]; _shaderMat.uniforms.texture.value[j] =_shaderMat.uniforms.texture.value[i]; _shaderMat.uniforms.alpha.value[j] = 1; _shaderMat.uniforms.alpha.value[i] = 0; that.tweenIndiceTime(i); } ======= _shaderMat.uniforms.mvpp.value[j] = _shaderMat.uniforms.mvpp.value[i]; _shaderMat.uniforms.translation.value[j] = _shaderMat.uniforms.translation.value[i]; _shaderMat.uniforms.texture.value[j] =_shaderMat.uniforms.texture.value[i]; _shaderMat.uniforms.alpha.value[j] = _alpha; _shaderMat.uniforms.alpha.value[i] = 0; that.tweenIndiceTime(i); } >>>>>>> _shaderMat.uniforms.mvpp.value[j] = _shaderMat.uniforms.mvpp.value[i]; _shaderMat.uniforms.translation.value[j] = _shaderMat.uniforms.translation.value[i]; _shaderMat.uniforms.texture.value[j] =_shaderMat.uniforms.texture.value[i]; _shaderMat.uniforms.alpha.value[j] = _alpha; _shaderMat.uniforms.alpha.value[i] = 0; that.tweenIndiceTime(i); }
<<<<<<< ToastPage, TabPage, TimeInputPage, TimePickerPage, TooltipPage, TablePage, TextPage, TempPage } from './src/page/index'; const NavLink = (props) => { return ( <Link {...props} activeClassName="active"></Link> ); } ======= ToastPage, TabPage, TimeInputPage, TimePickerPage, TooltipPage, TablePage, TextPage, } from './src/page'; >>>>>>> ToastPage, TabPage, TimeInputPage, TimePickerPage, TooltipPage, TablePage, TextPage, TempPage } from './src/page'; <<<<<<< ReactDOM.render(<Router history={hashHistory}> <Route path="/" component={App}> <IndexRoute component={RootPage}/> <Route path="/start" component={StartPage}></Route> <Route path="/install" component={InstallPage}></Route> <Route path="/component"> <IndexRoute component={BasicPage}/> <Route path="/component/button" component={ButtonPage}></Route> <Route path="/component/calender" component={CalenderPage}></Route> <Route path="/component/carousel" component={CarouselPage}></Route> <Route path="/component/checkbox" component={CheckBoxPage}></Route> <Route path="/component/checkboxgroup" component={CheckBoxGroupPage}></Route> <Route path="/component/comment" component={CommentPage}></Route> <Route path="/component/confirmbox" component={ConfirmBoxPage}></Route> <Route path="/component/datepicker" component={DatePickerPage}></Route> <Route path="/component/datetimepicker" component={DateTimePickerPage}></Route> <Route path="/component/dropdown" component={DropDownPage}></Route> <Route path="/component/form" component={FormPage}></Route> <Route path="/component/grid" component={GridPage}></Route> <Route path="/component/menu" component={MenuPage}></Route> <Route path="/component/toast" component={ToastPage}></Route> <Route path="/component/modal" component={ModalPage}></Route> <Route path="/component/notice" component={NoticePage}></Route> <Route path="/component/pagination" component={PaginationPage}></Route> <Route path="/component/pin" component={PinPage}></Route> <Route path="/component/panel" component={PanelPage}></Route> <Route path="/component/progress" component={ProgressPage}></Route> <Route path="/component/radio" component={RadioPage}></Route> <Route path="/component/radiogroup" component={RadioGroupPage}></Route> <Route path="/component/slidemenu" component={SlideMenuPage}></Route> <Route path="/component/tab" component={TabPage}></Route> <Route path="/component/timeinput" component={TimeInputPage}></Route> <Route path="/component/timepicker" component={TimePickerPage}></Route> <Route path="/component/tooltip" component={TooltipPage}></Route> <Route path="/component/card" component={CardPage}></Route> <Route path="/component/crumb" component={CrumbPage}></Route> <Route path="/component/icon" component={IconPage}></Route> <Route path="/component/image" component={ImagePage}></Route> <Route path="/component/input" component={InputPage}></Route> <Route path="/component/item" component={ItemPage}></Route> <Route path="/component/label" component={LabelPage}></Route> <Route path="/component/loader" component={LoaderPage}></Route> <Route path="/component/other" component={OtherPage}></Route> <Route path="/component/table" component={TablePage}></Route> <Route path="/component/text" component={TextPage}></Route> <Route path="/component/list" component={ListPage}></Route> </Route> <Router path="/temp" component={TempPage}></Router> </Route> ======= ReactDOM.render(<Router> <page> <Header/> <Route exact path="/" component={RootPage}></Route> <Route path="/component" component={ContentPage}></Route> <Route path="/start" component={ContentPage}></Route> <Route path="/install" component={ContentPage}></Route> <Footer/> </page> >>>>>>> ReactDOM.render(<Router> <page> <Header/> <Route exact path="/" component={RootPage}></Route> <Route path="/component" component={ContentPage}></Route> <Route path="/start" component={ContentPage}></Route> <Route path="/install" component={ContentPage}></Route> <Route path="/temp" component={ContentPage}></Route> <Footer/> </page>
<<<<<<< var Form = React.createClass({ displayName: 'Form', propTypes: { type: PropTypes.oneOf(['inline', 'trim', '']), onSubmit: PropTypes.func.isRequired }, getInitialState: function getInitialState() { return { errorFields: {} }; }, getChildContext: function getChildContext() { return { rules: this.props.rules, errorFields: this.state.errorFields }; }, childContextTypes: { rules: PropTypes.object, errorFields: PropTypes.object }, validateAll: function validateAll(succFunc, errFunc) { var _this = this; var _props2 = this.props, rules = _props2.rules, store = _props2.store; if (rules && store) { validator = validator || new Schema(rules); validator.validate(store, function (errors) { if (errors) { var errorFields = errors.reduce(function (prev, err) { prev[err.field] = err.message; return prev; }, {}); _this.setState({ errorFields: errorFields }); return errFunc && errFunc(errors); } _this.setState({ errorFields: {} }, function () { return succFunc(store); }); }); } }, handleSubmit: function handleSubmit(e) { e.preventDefault(); var _props3 = this.props, onSubmit = _props3.onSubmit, rules = _props3.rules, store = _props3.store, onError = _props3.onError; if (rules && store) { this.validateAll(onSubmit, function (errors) { // on error handler onError && onError(errors); }); } else { // submit value onSubmit(store); } return false; }, render: function render() { var _props = Object.assign({}, this.props); var className = _props.className, type = _props.type; className = klassName(NS, className, 'form'); delete _props.className; delete _props.rules; delete _props.store; if (type) { className = type + ' ' + className; if (type === 'trim') { className = 'inline ' + className; ======= var Form = function (_Component) { _inherits(Form, _Component); function Form() { _classCallCheck(this, Form); return _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).apply(this, arguments)); } _createClass(Form, [{ key: 'render', value: function render() { var _props = Object.assign({}, this.props); var className = _props.className, type = _props.type; className = klassName(NS, className, 'form'); delete _props.className; if (type) { className = type + ' ' + className; if (type === 'trim') { className = 'inline ' + className; } delete _props.type; >>>>>>> var Form = function (_Component) { _inherits(Form, _Component); function Form() { _classCallCheck(this, Form); return _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).apply(this, arguments)); } _createClass(Form, [{ key: 'render', value: function render() { var _props = Object.assign({}, this.props); var className = _props.className, type = _props.type; className = klassName(NS, className, 'form'); delete _props.className; delete _props.rules; delete _props.store; if (type) { className = type + ' ' + className; if (type === 'trim') { className = 'inline ' + className; } delete _props.type; <<<<<<< var Field = React.createClass({ displayName: 'Field', propTypes: { type: PropTypes.oneOf(['inline', '']), size: PropTypes.number }, contextTypes: { rules: PropTypes.object, errorFields: PropTypes.object }, render: function render() { var _props = Object.assign({}, this.props); var className = _props.className, type = _props.type, size = _props.size, label = _props.label, validate = _props.validate; var errorFields = this.context.errorFields; delete _props.validate; // validate node var errorNode = null; if (errorFields && errorFields[validate]) { className = className + ' error'; errorNode = React.createElement( 'span', { className: 'text-extra color-red' }, errorFields[validate] ); } if (size) { className = klassName(NS, className, 'field-' + size); delete _props.size; } else { className = klassName(NS, className, 'field'); } delete _props.className; if (type) { className = type + ' ' + className; delete _props.type; } if (label) { delete _props.label; return React.createElement( 'div', _extends({}, _props, { className: className }), React.createElement( 'label', { htmlFor: '' }, label ), _props.children, errorNode ); } return React.createElement( 'div', _extends({}, _props, { className: className }), _props.children, errorNode ); ======= var Field = function (_Component2) { _inherits(Field, _Component2); function Field() { _classCallCheck(this, Field); return _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).apply(this, arguments)); >>>>>>> var Field = function (_Component2) { _inherits(Field, _Component2); function Field() { _classCallCheck(this, Field); return _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).apply(this, arguments));
<<<<<<< ======= const file = dropEvent.dataTransfer.files[0] const filePath = file.path const originalFileName = path.basename(filePath) const fileType = file['type'] const isImage = fileType.startsWith('image') const isGif = fileType.endsWith('gif') >>>>>>> <<<<<<< if (dropEvent.dataTransfer.files.length > 0) { promise = Promise.all(Array.from(dropEvent.dataTransfer.files).map(file => { if (file['type'].startsWith('image')) { return fixRotate(file) .then(data => copyAttachment({type: 'base64', data: data, sourceFilePath: file.path}, storageKey, noteKey) .then(fileName => ({ fileName, title: path.basename(file.path), isImage: true })) ) } else { return copyAttachment(file.path, storageKey, noteKey).then(fileName => ({ fileName, title: path.basename(file.path), isImage: false })) } })) ======= if (isImage && !isGif) { promise = fixRotate(file).then(base64data => { return copyAttachment({type: 'base64', data: base64data, sourceFilePath: filePath}, storageKey, noteKey) }) >>>>>>> if (dropEvent.dataTransfer.files.length > 0) { promise = Promise.all(Array.from(dropEvent.dataTransfer.files).map(file => { if (file['type'].startsWith('image') && !file['type'].endsWith('gif')) { return fixRotate(file) .then(data => copyAttachment({type: 'base64', data: data, sourceFilePath: file.path}, storageKey, noteKey) .then(fileName => ({ fileName, title: path.basename(file.path), isImage: true })) ) } else { return copyAttachment(file.path, storageKey, noteKey).then(fileName => ({ fileName, title: path.basename(file.path), isImage: false })) } }))
<<<<<<< import { Button } from '../packages/chakra-ui-core/src' ======= import { Button } from '../packages/kiwi-core/src' import { colorModeObserver } from '../packages/kiwi-core/src/utils/color-mode-observer' const watch = { $theme: { immediate: true, handler (theme) { colorModeObserver.theme = theme() } }, $icons: { immediate: true, handler (icons) { colorModeObserver.icons = icons } } } >>>>>>> import { Button } from '../packages/chakra-ui-core/src' import { colorModeObserver } from '../packages/kiwi-core/src/utils/color-mode-observer' const watch = { $theme: { immediate: true, handler (theme) { colorModeObserver.theme = theme() } }, $icons: { immediate: true, handler (icons) { colorModeObserver.icons = icons } } }
<<<<<<< function exportStorage (storageKey, fileType, exportDir, config) { ======= function exportStorage(storageKey, fileType, exportDir) { >>>>>>> function exportStorage(storageKey, fileType, exportDir, config) { <<<<<<< .then(storage => { return resolveStorageNotes(storage).then(notes => ({ storage, notes: notes.filter(note => !note.isTrashed && note.type === 'MARKDOWN_NOTE') })) }) .then(({ storage, notes }) => { let contentFormatter = null if (fileType === 'md') { contentFormatter = formatMarkdown({ storagePath: storage.path, export: config.export }) } else if (fileType === 'html') { contentFormatter = formatHTML({ theme: config.ui.theme, fontSize: config.preview.fontSize, fontFamily: config.preview.fontFamily, codeBlockTheme: config.preview.codeBlockTheme, codeBlockFontFamily: config.editor.fontFamily, lineNumber: config.preview.lineNumber, indentSize: config.editor.indentSize, scrollPastEnd: config.preview.scrollPastEnd, smartQuotes: config.preview.smartQuotes, breaks: config.preview.breaks, sanitize: config.preview.sanitize, customCSS: config.preview.customCSS, allowCustomCSS: config.preview.allowCustomCSS, storagePath: storage.path, export: config.export }) } ======= .then(storage => resolveStorageNotes(storage).then(notes => ({ storage, notes })) ) .then(function exportNotes(data) { const { storage, notes } = data >>>>>>> .then(storage => { return resolveStorageNotes(storage).then(notes => ({ storage, notes: notes.filter( note => !note.isTrashed && note.type === 'MARKDOWN_NOTE' ) })) }) .then(({ storage, notes }) => { let contentFormatter = null if (fileType === 'md') { contentFormatter = formatMarkdown({ storagePath: storage.path, export: config.export }) } else if (fileType === 'html') { contentFormatter = formatHTML({ theme: config.ui.theme, fontSize: config.preview.fontSize, fontFamily: config.preview.fontFamily, codeBlockTheme: config.preview.codeBlockTheme, codeBlockFontFamily: config.editor.fontFamily, lineNumber: config.preview.lineNumber, indentSize: config.editor.indentSize, scrollPastEnd: config.preview.scrollPastEnd, smartQuotes: config.preview.smartQuotes, breaks: config.preview.breaks, sanitize: config.preview.sanitize, customCSS: config.preview.customCSS, allowCustomCSS: config.preview.allowCustomCSS, storagePath: storage.path, export: config.export }) } <<<<<<< const folderExportedDir = path.join(exportDir, filenamify(folder.name, {replacement: '_'})) ======= const folderExportedDir = path.join( exportDir, filenamify(folder.name, { replacement: '_' }) ) >>>>>>> const folderExportedDir = path.join( exportDir, filenamify(folder.name, { replacement: '_' }) ) <<<<<<< ======= notes .filter(note => !note.isTrashed && note.type === 'MARKDOWN_NOTE') .forEach(markdownNote => { const folderExportedDir = folderNamesMapping[markdownNote.folder] const snippetName = `${filenamify(markdownNote.title, { replacement: '_' })}.${fileType}` const notePath = path.join(folderExportedDir, snippetName) fs.writeFileSync(notePath, markdownNote.content) }) >>>>>>>
<<<<<<< const {className, value, config, storageKey, noteKey, getNote} = this.props ======= const {className, value, config, storageKey, noteKey, linesHighlighted} = this.props >>>>>>> const {className, value, config, storageKey, noteKey, linesHighlighted, getNote} = this.props <<<<<<< getNote={getNote} export={config.export} ======= onDrop={(e) => this.handleDropImage(e)} >>>>>>> getNote={getNote} export={config.export} onDrop={(e) => this.handleDropImage(e)}
<<<<<<< exports.candlestickData = candlestickData; ======= >>>>>>> exports.candlestickData = candlestickData;
<<<<<<< SORT_DATASET = 'SORT_DATASET', FILTER_DATASET = 'FILTER_DATASET', SHOW_EXPRESSION_TEXTBOX = 'SHOW_EXPRESSION_TEXTBOX'; ======= SORT_DATASET = 'SORT_DATASET', SUMMARIZE_AGGREGATE = 'SUMMARIZE_AGGREGATE'; >>>>>>> SORT_DATASET = 'SORT_DATASET', FILTER_DATASET = 'FILTER_DATASET', SHOW_EXPRESSION_TEXTBOX = 'SHOW_EXPRESSION_TEXTBOX', SUMMARIZE_AGGREGATE = 'SUMMARIZE_AGGREGATE'; <<<<<<< /** * Action creator to add filter data transformations to dataset * * @param {number} dsId - Id of the dataset. * @param {string} expression - expression (in JavaScript * syntax) for the filter predicate. The expression language * includes the variable datum, corresponding to the current * data object. * @returns {Object} FILTER_DATASET action with info about * field to be filtered */ function filterDataset(dsId, expression) { return { type: FILTER_DATASET, id: dsId, expression: expression }; } function showExpressionTextbox(dsId, show, time) { return { type: SHOW_EXPRESSION_TEXTBOX, id: dsId, show: show, time: time }; } ======= function summarizeAggregate(id, summarize) { return { type: SUMMARIZE_AGGREGATE, id: id, summarize: summarize }; } >>>>>>> /** * Action creator to add filter data transformations to dataset * * @param {number} dsId - Id of the dataset. * @param {string} expression - expression (in JavaScript * syntax) for the filter predicate. The expression language * includes the variable datum, corresponding to the current * data object. * @returns {Object} FILTER_DATASET action with info about * field to be filtered */ function filterDataset(dsId, expression) { return { type: FILTER_DATASET, id: dsId, expression: expression }; } function showExpressionTextbox(dsId, show, time) { return { type: SHOW_EXPRESSION_TEXTBOX, id: dsId, show: show, time: time }; } function summarizeAggregate(id, summarize) { return { type: SUMMARIZE_AGGREGATE, id: id, summarize: summarize }; } <<<<<<< FILTER_DATASET: FILTER_DATASET, SHOW_EXPRESSION_TEXTBOX: SHOW_EXPRESSION_TEXTBOX, ======= SUMMARIZE_AGGREGATE: SUMMARIZE_AGGREGATE, >>>>>>> FILTER_DATASET: FILTER_DATASET, SHOW_EXPRESSION_TEXTBOX: SHOW_EXPRESSION_TEXTBOX, SUMMARIZE_AGGREGATE: SUMMARIZE_AGGREGATE, <<<<<<< sortDataset: sortDataset, filterDataset: filterDataset, showExpressionTextbox: showExpressionTextbox ======= sortDataset: sortDataset, summarizeAggregate: summarizeAggregate >>>>>>> sortDataset: sortDataset, filterDataset: filterDataset, showExpressionTextbox: showExpressionTextbox, summarizeAggregate: summarizeAggregate
<<<<<<< MTYPES: ['nominal', 'quantitative', 'temporal'], // ordinal not yet used NAME_REGEX: NAME_REGEX ======= reset: reset >>>>>>> NAME_REGEX: NAME_REGEX
<<<<<<< ADD_DATASET = 'ADD_DATASET', INIT_DATASET = 'INIT_DATASET', SORT_DATASET = 'SORT_DATASET'; ======= ADD_DATASET = 'ADD_DATASET'; >>>>>>> ADD_DATASET = 'ADD_DATASET', SORT_DATASET = 'SORT_DATASET'; <<<<<<< /** * Action creator to indicate that a Dataset's raw values have been loaded, and * a schema has been constructed. * * @param {number} id The ID of the Dataset that has been initialized. * @returns {Object} An INIT_DATASET action. */ function initDataset(id) { return { type: INIT_DATASET, id: id }; } /** * Action creator to add transformations to dataset */ function sortDataset(dsId, sortField, sortOrder) { return { type: SORT_DATASET, id: dsId, sortField: sortField, sortOrder: sortOrder }; } ======= >>>>>>> /** * Action creator to add transformations to dataset */ function sortDataset(dsId, sortField, sortOrder) { return { type: SORT_DATASET, id: dsId, sortField: sortField, sortOrder: sortOrder }; } <<<<<<< INIT_DATASET: INIT_DATASET, SORT_DATASET: SORT_DATASET, ======= >>>>>>> SORT_DATASET: SORT_DATASET, <<<<<<< addDataset: addDataset, initDataset: initDataset, sortDataset: sortDataset ======= addDataset: addDataset >>>>>>> addDataset: addDataset, sortDataset: sortDataset