conflict_resolution
stringlengths
27
16k
<<<<<<< if (this.ok === true) { window.mainPage.overlay.renderSuccessScreen(` ======= let screen; if (this.status === STATUS.OK) { screen = this.getSuccessScreen(` >>>>>>> let screen; if (this.status === STATUS.OK) { window.mainPage.overlay.renderSuccessScreen(` <<<<<<< } else { let meta = window.mainPage.toolchain.get('meta'); if (!meta || !meta.visualizations || !meta.visualizations[0] || !meta.datasets || !meta.datasets[0]) { window.mainPage.overlay.renderUserErrorScreen(` You need to choose both a Dataset and a Visualization in order to connect them together.`); } else { window.mainPage.overlay.renderUserErrorScreen(` ======= } else if (this.status === STATUS.NOT_ENOUGH_MAPPINGS) { screen = this.getErrorScreen(` >>>>>>> } else if (this.status === STATUS.NOT_ENOUGH_MAPPINGS) { window.mainPage.overlay.renderUserErrorScreen(` <<<<<<< ======= window.mainPage.overlay.render(screen); >>>>>>>
<<<<<<< ======= /* this.listenTo(window.mainPage.project, 'rl:changeMatchings', this.render);*/ >>>>>>> <<<<<<< constructAttributeLookupTable: function () { ======= renderAttributeSettings: function () { >>>>>>> constructAttributeLookupTable: function () { <<<<<<< ======= let dataset; if (window.mainPage.project) { let datasets = window.mainPage.project.getMeta('datasets'); dataset = window.mainPage.loadedDatasets[datasets[0]]; } let editor; if (widgetIsShowing) { this.$el.html(myTemplate); this.renderAttributeSettings(); editor = ace.edit('editor'); editor.setOptions({ fontFamily: 'Cutive Mono, Courier, Monospace', fontSize: '10pt' }); editor.setTheme('ace/theme/textmate'); editor.$blockScrolling = Infinity; } else { // dummy "editor" that does nothing // if the widget is collapsed editor = { setValue: () => {}, setReadOnly: () => {} }; } >>>>>>> let dataset; if (window.mainPage.project) { let datasets = window.mainPage.project.getMeta('datasets'); dataset = window.mainPage.loadedDatasets[datasets[0]]; } <<<<<<< }, 300) ======= // TODO: allow the user to edit the data (convert // to in-browser dataset)... for now, always disable // the textarea editor.setReadOnly(true); }, 200) >>>>>>> }, 300)
<<<<<<< ======= import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER'; import Statistic from 'parser/ui/Statistic'; import BoringSpellValue from 'parser/ui/BoringSpellValue'; >>>>>>> <<<<<<< <StatisticBox icon={<SpellIcon id={SPELLS.IRONFUR.id} />} value={`${formatPercentage(nonGoEIronFur / (nonGoEIronFur + GoEIronFur))}%`} label="Unbuffed Ironfur" tooltip={ <> You cast <strong>{nonGoEIronFur + GoEIronFur}</strong> total {SPELLS.IRONFUR.name} and{' '} <strong>{GoEIronFur}</strong> were buffed by 2s. </> } /> ======= <Statistic position={STATISTIC_ORDER.CORE(10)} size="flexible" tooltip={<>You cast <strong>{nonGoEIronFur + GoEIronFur}</strong> total {SPELLS.IRONFUR.name} and <strong>{GoEIronFur}</strong> were buffed by 2s.</>} > <BoringSpellValue spell={SPELLS.IRONFUR} value={`${formatPercentage(nonGoEIronFur / (nonGoEIronFur + GoEIronFur))}%`} label="Unbuffed Ironfur" /> </Statistic> >>>>>>> <Statistic position={STATISTIC_ORDER.CORE(10)} size="flexible" tooltip={ <> You cast <strong>{nonGoEIronFur + GoEIronFur}</strong> total {SPELLS.IRONFUR.name} and{' '} <strong>{GoEIronFur}</strong> were buffed by 2s. </> } > <BoringSpellValue spell={SPELLS.IRONFUR} value={`${formatPercentage(nonGoEIronFur / (nonGoEIronFur + GoEIronFur))}%`} label="Unbuffed Ironfur" /> </Statistic>
<<<<<<< * @return {null} */ ======= * @return {Promise} returns Promise if no callback passed */ >>>>>>> * @return {Promise} returns Promise if no callback passed */ <<<<<<< * @return {null} */ ======= * @return {Promise} returns Promise if no callback passed */ >>>>>>> * @return {Promise} returns Promise if no callback passed */ <<<<<<< // Set default empty server options ======= // Get the promiseLibrary var promiseLibrary = options.promiseLibrary; // No promise library selected fall back if(!promiseLibrary) { promiseLibrary = typeof global.Promise == 'function' ? global.Promise : require('es6-promise').Promise; } // Return a promise if(typeof callback != 'function') { return new promiseLibrary(function(resolve, reject) { connect(url, options, function(err, db) { if(err) return reject(err); resolve(db); }); }); } // Fallback to callback based connect connect(url, options, callback); } var connect = function(url, options, callback) { // Set default empty server options >>>>>>> // Get the promiseLibrary var promiseLibrary = options.promiseLibrary; // No promise library selected fall back if(!promiseLibrary) { promiseLibrary = typeof global.Promise == 'function' ? global.Promise : require('es6-promise').Promise; } // Return a promise if(typeof callback != 'function') { return new promiseLibrary(function(resolve, reject) { connect(url, options, function(err, db) { if(err) return reject(err); resolve(db); }); }); } // Fallback to callback based connect connect(url, options, callback); } var connect = function(url, options, callback) { <<<<<<< connectFunction(_server); } ======= connectFunction(_server); } >>>>>>> connectFunction(_server); }
<<<<<<< ======= // APM tests , '/test/functional/apm_tests.js' // GridFS , '/test/functional/gridfs_stream_tests.js' >>>>>>> // GridFS , '/test/functional/gridfs_stream_tests.js'
<<<<<<< * @param {boolean} [options.keepAlive=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket. ======= * @param {number} [options.family=4] Version of IP stack. Defaults to 4. * @param {boolean} [options.keepAlive=0] The number of milliseconds to wait before initiating keepAlive on the TCP socket. >>>>>>> * @param {number} [options.family=4] Version of IP stack. Defaults to 4. * @param {boolean} [options.keepAlive=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket. <<<<<<< * @param {boolean} [options.keepAlive=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket. ======= * @param {number} [options.family=4] Version of IP stack. Defaults to 4. * @param {boolean} [options.keepAlive=0] The number of milliseconds to wait before initiating keepAlive on the TCP socket. >>>>>>> * @param {number} [options.family=4] Version of IP stack. Defaults to 4. * @param {boolean} [options.keepAlive=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket.
<<<<<<< if (response.headers['content-type'].indexOf("text/html") != -1) { if (chunk.toString().indexOf(tag)) { var cache = new Date().getTime(); var includes = '<script type="text/javascript" src="/_jellyfish/serv/jquery-1.4.4.min.js?'+cache+'"></script>'; includes += '<script type="text/javascript" src="/_jellyfish/serv/nemato.js?'+cache+'"></script>'; includes += tag; chunk = chunk.toString().replace(tag, includes); ======= if (response.headers['content-type'] && response.headers['content-type'].indexOf("text/html") != -1) { if (chunk.toString().indexOf('</head>')) { var includes = '<script type="text/javascript" src="/_jellyfish/serv/jquery-1.4.4.min.js"></script>'; includes += '<script type="text/javascript" src="/_jellyfish/serv/nemato.js"></script>'; includes += '</head>'; chunk = chunk.toString().replace('</head>', includes); >>>>>>> if (response.headers['content-type'] && response.headers['content-type'].indexOf("text/html") != -1) { if (chunk.toString().indexOf(tag)) { var cache = new Date().getTime(); var includes = '<script type="text/javascript" src="/_jellyfish/serv/jquery-1.4.4.min.js?'+cache+'"></script>'; includes += '<script type="text/javascript" src="/_jellyfish/serv/nemato.js?'+cache+'"></script>'; includes += tag; chunk = chunk.toString().replace(tag, includes);
<<<<<<< existingWebhook = webhooks.find(x => x.name === webHookName); // You can rename 'Webhook' to the name of your bot if you like, people will see if under the webhooks tab of the channel. if (!existingWebhook) { channel.createWebhook(webHookName, "https://cdn.discordapp.com/icons/545787876105912341/a89767345fbb7216f52591ba6d683056.png?size=512&quot") .then(newWebhook => { ======= channel.createWebhook(webHookName, "https://i.ibb.co/vjcn66h/67-678785-open-subscribe-bell-icon-png.png") .then(newWebhook => { >>>>>>> existingWebhook = webhooks.find(x => x.name === webHookName); // You can rename 'Webhook' to the name of your bot if you like, people will see if under the webhooks tab of the channel. if (!existingWebhook) { channel.createWebhook(webHookName, "https://i.ibb.co/vjcn66h/67-678785-open-subscribe-bell-icon-png.png") .then(newWebhook => {
<<<<<<< .icon('delete', 'svg/ic_delete_black_48px.svg') .icon('drag', 'svg/drag.svg') ======= .icon('comment', 'svg/ic_comment_black_48px.svg') .icon('file', 'svg/ic_insert_drive_file_black_48px.svg') .icon('list', 'svg/ic_list_black_48px.svg') .icon('clock', 'svg/ic_access_time_black_48px.svg') >>>>>>> .icon('delete', 'svg/ic_delete_black_48px.svg') .icon('drag', 'svg/drag.svg') .icon('comment', 'svg/ic_comment_black_48px.svg') .icon('file', 'svg/ic_insert_drive_file_black_48px.svg') .icon('list', 'svg/ic_list_black_48px.svg') .icon('clock', 'svg/ic_access_time_black_48px.svg')
<<<<<<< }, keys: function() { return this.slotCursor().keys(); ======= }, //-- iterators ----------------------------------------- eachSlot: function(fn, reverse) { var cur = this.slotCursor(); if(reverse) { cur.last(); } else { cur.first(); } var k; while(k = cur.key()) { var node = this.at(k); if(fn.call(node, node, k)) { break; } if (reverse) { cur.prev(); } else { cur.next(); } } return this; }, eachSlotReverse: function(fn) { return this.eachSlot(fn, true); >>>>>>> }, keys: function() { return this.slotCursor().keys(); }, //-- iterators ----------------------------------------- eachSlot: function(fn, reverse) { var cur = this.slotCursor(); if(reverse) { cur.last(); } else { cur.first(); } var k; while(k = cur.key()) { var node = this.at(k); if(fn.call(node, node, k)) { break; } if (reverse) { cur.prev(); } else { cur.next(); } } return this; }, eachSlotReverse: function(fn) { return this.eachSlot(fn, true);
<<<<<<< <CTALink className="btn btn-secondary" to="/start"> {t('ctaCheckSymptoms')}<i className="fas fa-arrow-right ml-1"></i> ======= <CTALink className="btn btn-secondary" to="/report"> Revisar mis síntomas<i className="fas fa-arrow-right ml-1"></i> >>>>>>> <CTALink className="btn btn-secondary" to="/report"> {t('ctaCheckSymptoms')}<i className="fas fa-arrow-right ml-1"></i>
<<<<<<< import { useHistory } from 'react-router-dom' import { useTranslation, Trans } from 'react-i18next' ======= >>>>>>> import { useTranslation, Trans } from 'react-i18next' <<<<<<< const Start = ({ setFormState }) => { const {t} = useTranslation('formStart') const history = useHistory() ======= const Start = ({ setFormState, form }) => { >>>>>>> const Start = ({ setFormState, form }) => { <<<<<<< <div className="text-center"> <button className="btn btn-link" style={{ whiteSpace: 'normal' }} onClick={() => clickHandler('testing')} > {t('justTesting')} </button> </div> ======= >>>>>>>
<<<<<<< import Background from './images/backgrounds/JainaProudmoore.jpg'; import Headshot from './images/headshots/JainaProudmoore.png'; ======= // import Background from './images/backgrounds/FridaIronbellows.jpg'; import Headshot from './images/headshots/JainaProudmoore.jpg'; import { BOD_ALLIANCE_TO_HORDE } from './RaceTranslation'; >>>>>>> import Background from './images/backgrounds/JainaProudmoore.jpg'; import Headshot from './images/headshots/JainaProudmoore.png'; import { BOD_ALLIANCE_TO_HORDE } from './RaceTranslation';
<<<<<<< import InfiniteGrid from './Grid/InfiniteGrid/InfiniteGrid'; ======= import DragFormToGrid from './Grid/AddonsDecorations/DragFormToGrid/DragFormToGrid'; >>>>>>> import InfiniteGrid from './Grid/InfiniteGrid/InfiniteGrid'; import DragFormToGrid from './Grid/AddonsDecorations/DragFormToGrid/DragFormToGrid';
<<<<<<< it('should set service_name and service_job_id if it\'s running via Surf', done => { ======= it ("should set service_name and service_job_id if it's running on AppVeyor", function(done){ testAppVeyor(getOptions, done); }); it ("should set service_name and service_job_id if it's running via Surf", function(done){ >>>>>>> it ("should set service_name and service_job_id if it's running on AppVeyor", done => { testAppVeyor(getOptions, done); }); it('should set service_name and service_job_id if it\'s running via Surf', done => { <<<<<<< const testSurf = (sut, done) => { ======= var testAppVeyor = function(sut, done) { process.env.APPVEYOR = true; process.env.APPVEYOR_BUILD_ID = "1234"; process.env.APPVEYOR_BUILD_NUMBER = "5678"; process.env.APPVEYOR_REPO_COMMIT = "e3e3e3e3e3e3e3e3e"; process.env.APPVEYOR_REPO_BRANCH = "feature"; sut(function(err, options){ options.service_name.should.equal("appveyor"); options.service_job_id.should.equal("1234"); options.service_job_number.should.equal("5678"); options.git.should.eql({ head: { id: 'e3e3e3e3e3e3e3e3e', author_name: 'Unknown Author', author_email: '', committer_name: 'Unknown Committer', committer_email: '', message: 'Unknown Commit Message' }, branch: 'feature', remotes: [] }); done(); }); }; var testSurf = function(sut, done) { >>>>>>> const testAppVeyor = function(sut, done) { process.env.APPVEYOR = true; process.env.APPVEYOR_BUILD_ID = "1234"; process.env.APPVEYOR_BUILD_NUMBER = "5678"; process.env.APPVEYOR_REPO_COMMIT = "e3e3e3e3e3e3e3e3e"; process.env.APPVEYOR_REPO_BRANCH = "feature"; sut(function(err, options){ options.service_name.should.equal("appveyor"); options.service_job_id.should.equal("1234"); options.service_job_number.should.equal("5678"); options.git.should.eql({ head: { id: 'e3e3e3e3e3e3e3e3e', author_name: 'Unknown Author', author_email: '', committer_name: 'Unknown Committer', committer_email: '', message: 'Unknown Commit Message' }, branch: 'feature', remotes: [] }); done(); }); }; const testSurf = (sut, done) => {
<<<<<<< work: function (font_id, glyphs) { ======= work: function (font_id, config, user) { >>>>>>> work: function (font_id, config) { <<<<<<< glyphs: glyphs ======= fontname: config.font.fontname, glyphs: config.glyphs, user: user >>>>>>> fontname: config.font.fontname, glyphs: config.glyphs, <<<<<<< glyphs: glyphs.length, time: (times[2] - times[0]) / 1000 ======= glyphs: config.glyphs.length, time: (times[2] - times[0]) / 1000, user: user >>>>>>> glyphs: config.glyphs.length, time: (times[2] - times[0]) / 1000, <<<<<<< var self = this, glyphs = get_glyphs_config(params), font_id, errmsg; ======= var self = this, font = get_font_config(params), font_id, user, errmsg; >>>>>>> var self = this, font = get_font_config(params), font_id, errmsg; <<<<<<< font_id = get_download_id(glyphs); ======= font_id = get_download_id(font); user = this.__raw__.socket.handshake.address.address; >>>>>>> font_id = get_download_id(font); <<<<<<< worker_id: job_mgr.enqueue('generate-font', font_id, glyphs) ======= worker_id: job_mgr.enqueue('generate-font', font_id, font, user) >>>>>>> worker_id: job_mgr.enqueue('generate-font', font_id, font)
<<<<<<< pulseVelocity = 0.008, pulseQuantity = 3, // Seed is used to generate the note field so that random // one persons's grid can be saved & replicated seed = Math.floor( Math.random() * 10000 ), ======= >>>>>>> pulseVelocity = 0.008, pulseQuantity = 3, // Seed is used to generate the note field so that random // one persons's grid can be saved & replicated seed = Math.floor( Math.random() * 10000 ), <<<<<<< SaveButton.addEventListener('click', onSaveButtonClicked, false); document.addEventListener('mousedown', onDocumentMouseDown, false); ======= canvas.addEventListener('mousedown', onDocumentMouseDown, false); >>>>>>> SaveButton.addEventListener('click', onSaveButtonClicked, false); canvas.addEventListener('mousedown', onDocumentMouseDown, false); <<<<<<< ======= >>>>>>>
<<<<<<< _this.trackKeenEvent("widget_dismissed"); _this.trigger('dismiss.widget', { dismissals: dismissals.count }); ======= _this.trigger('widget.dismissed', { dismissals: dismissals.count }); >>>>>>> _this.trackKeenEvent("widget_dismissed"); _this.trigger('widget.dismissed', { dismissals: dismissals.count });
<<<<<<< ======= Options.prototype.getKeenGlobals = function(eventCollection) { // setup the global properties we'll use var globalProperties = { UUID: KEEN_UUID, has_network_connection: navigator.onLine, chrome_version: window.navigator.appVersion }; return globalProperties; }; function triggerLoading(el, opts) { var $el = $(el), saveText = $el.text(), promise; $el.addClass('loading'); $el.text('loading..'); if (opts && opts.promise) { promise = $.Deferred(); $.when(promise) .then(unload) return promise; } else { setTimeout(unload, 1000); } function unload() { $el.removeClass('loading'); $el.text(saveText); } } >>>>>>>
<<<<<<< settings: { waitlistHost: "http://share.getwaltz.com", waitlistPaths: { reserve: '/u/reserve', check: '/u/check', setEmail: '/u/email/set', inviteCreate: '/i/create', inviteAdd: '/i/add', inviteClear: '/i/clear' } } }; ======= settings: {} } >>>>>>> settings: {} };
<<<<<<< contain: {user: 1}, order: ['Group.name ASC'] ======= order: ['Group.name ASC'], silent: false >>>>>>> contain: {user: 1}, order: ['Group.name ASC'], silent: false
<<<<<<< marilia: { name: 'Marília Gabriela', username: 'MGabrielaReal', msg: 'Poór que você fez isso?', image: 'https://i.imgur.com/bRPRe0T.jpg' }, ======= arnaldo: { name: 'Arnaldo Cezar Coelho', username: 'coelhoarnaldoc', msg: 'A regra é clara!', image: 'https://i.imgur.com/x4ZJO0Y.jpg' }, >>>>>>> marilia: { name: 'Marília Gabriela', username: 'MGabrielaReal', msg: 'Poór que você fez isso?', image: 'https://i.imgur.com/bRPRe0T.jpg' }, arnaldo: { name: 'Arnaldo Cezar Coelho', username: 'coelhoarnaldoc', msg: 'A regra é clara!', image: 'https://i.imgur.com/x4ZJO0Y.jpg' },
<<<<<<< for (var plugin in Pouch.plugins) { // In future these will likely need to be async to allow the plugin // to initialise var pluginObj = Pouch.plugins[plugin](db); for (var api in pluginObj) { // We let things like the http adapter use its own implementation // as it shares a lot of code if (!(api in db)) { db[api] = pluginObj[api]; } } } db.taskqueue.ready(true); db.taskqueue.execute(db); callback(null, db); }); for (var j in adapter) { that[j] = adapter[j]; } }; // Don't call Pouch.open for ALL_DBS // Pouch.open saves the db's name into ALL_DBS if (name === Pouch.allDBName(opts.adapter)) { cb(); } else { Pouch.open(opts.adapter, opts.name, cb); ======= } callback(null, db); }); for (var j in adapter) { this[j] = adapter[j]; >>>>>>> for (var plugin in Pouch.plugins) { // In future these will likely need to be async to allow the plugin // to initialise var pluginObj = Pouch.plugins[plugin](db); for (var api in pluginObj) { // We let things like the http adapter use its own implementation // as it shares a lot of code if (!(api in db)) { db[api] = pluginObj[api]; } } } callback(null, db); }); for (var j in adapter) { that[j] = adapter[j]; } }; // Don't call Pouch.open for ALL_DBS // Pouch.open saves the db's name into ALL_DBS if (name === Pouch.allDBName(opts.adapter)) { cb(); } else { Pouch.open(opts.adapter, opts.name, cb);
<<<<<<< if (before) { parentEl.insertBefore(childEl, before.el || before); } else { parentEl.appendChild(childEl); } if (parentEl.mounted || document.contains(childEl)) { ======= doMount(parentEl, childEl, before); if (!wasMounted && (parentEl.mounted || document.contains(childEl))) { >>>>>>> if (before) { parentEl.insertBefore(childEl, before.el || before); } else { parentEl.appendChild(childEl); } if (!wasMounted && (parentEl.mounted || document.contains(childEl))) {
<<<<<<< declaringView._elementsByCid || (declaringView._elementsByCid = {}); declaringView._elementsByCid[cid] = element; return new Handlebars.SafeString(Thorax.Util.tag.call(this, htmlAttributes)); ======= this._view._elementsByCid || (this._view._elementsByCid = {}); this._view._elementsByCid[cid] = element; return new Handlebars.SafeString(Thorax.Util.tag(htmlAttributes)); >>>>>>> declaringView._elementsByCid || (declaringView._elementsByCid = {}); declaringView._elementsByCid[cid] = element; return new Handlebars.SafeString(Thorax.Util.tag(htmlAttributes));
<<<<<<< // 只预览图片格式。 if ( !file.type.match( /^image/ ) ) { cb( true ); return; } Image.makeThumbnail( file.getSource(), cb, width, height, true ); ======= Image.makeThumbnail( file.getSource(), cb, width, height, true, type, quality ); >>>>>>> // 只预览图片格式。 if ( !file.type.match( /^image/ ) ) { cb( true ); return; } Image.makeThumbnail( file.getSource(), cb, width, height, true, type, quality );
<<<<<<< this.el.innerHTML = ''; {{#has-plugin "collection"}} var element; if (this.collection && this._collectionOptionsByCid[this.collection.cid] && this._renderCount) { // preserveCollectionElement calls the callback after it has a reference // to the collection element, calls the callback, then re-appends the element preserveCollectionElement.call(this, function() { element = this.$el.append(html); }); } else { element = this.$el.append(html); } {{else}} var element = this.$el.append(html); {{/has-plugin}} {{#has-plugin "helpers/view"}} this._appendViews(); {{/has-plugin}} {{#has-plugin "helpers/element"}} this._appendElements(); {{/has-plugin}} ======= this.el.innerHTML = ""; var element = this.$el.append(html); this.trigger('append'); >>>>>>> this.el.innerHTML = ""; var element; if (this.collection && this._collectionOptionsByCid[this.collection.cid] && this._renderCount) { // preserveCollectionElement calls the callback after it has a reference // to the collection element, calls the callback, then re-appends the element preserveCollectionElement.call(this, function() { element = this.$el.append(html); }); } else { element = this.$el.append(html); } this.trigger('append');
<<<<<<< {{#has-plugin "helpers/view"}} this._appendViews(null, function(el) { el.setAttribute(modelCidAttributeName, model.cid); }); {{/has-plugin}} {{#has-plugin "helpers/element"}} this._appendElements(null, function(el) { el.setAttribute(modelCidAttributeName, model.cid); }); {{/has-plugin}} !options.silent && this.trigger('rendered:item', this, this.collection, model, itemElement, index); ======= this.trigger('append', null, function(el) { el.setAttribute(modelCidAttributeName, model.cid); }); !options.silent && this.parent.trigger('rendered:item', this, this.collection, model, itemElement, index); >>>>>>> this.trigger('append', null, function(el) { el.setAttribute(modelCidAttributeName, model.cid); }); !options.silent && this.trigger('rendered:item', this, this.collection, model, itemElement, index); <<<<<<< var collectionHelperOptionNames = { 'item-template': 'itemTemplate', 'empty-template': 'emptyTemplate', 'item-view': 'itemView', 'empty-view': 'emptyView', 'empty-class': 'emptyClass' {{#has-plugin "loading"}} , 'loading-template': 'loadingTemplate' , 'loading-view': 'loadingView' {{/has-plugin}} }; function forwardRenderEvent(eventName) { return function() { var args = _.toArray(arguments); args.unshift(eventName); this.parent.trigger.apply(this.parent, args); } } function forwardMissingProperty(methodName, force) { if (!this[methodName] || force) { var method = getParent(this)[methodName]; method && (this[methodName] = method); } } function afterSetCollection(collection) { if (collection && !collectionHelperPresentForPrimaryCollection.call(this)) { bindEvents.call(this, collection, this._collectionRenderingEvents); } else if (!collectionHelperPresentForPrimaryCollection.call(this)) { unbindEvents.call(this, this.collection, this._collectionRenderingEvents); } } function collectionHelperPresentForPrimaryCollection() { return this.collection && this.$('[' + primaryCollectionAttributeName + '="' + this.collection.cid + '"]').length; } function preserveCollectionElement(callback) { var oldCollectionElement = this.getCollectionElement(); callback.call(this); this.getCollectionElement().replaceWith(oldCollectionElement); } ======= var collectionOptionNames = [ 'item-template', 'empty-template', 'item-view', 'empty-view', 'item-context', 'empty-context', 'empty-class', 'filter' ]; >>>>>>> function forwardRenderEvent(eventName) { return function() { var args = _.toArray(arguments); args.unshift(eventName); this.parent.trigger.apply(this.parent, args); } } function forwardMissingProperty(methodName, force) { if (!this[methodName] || force) { var method = getParent(this)[methodName]; method && (this[methodName] = method); } } // TODO: replace with listenTo function afterSetCollection(collection) { if (collection && !collectionHelperPresentForPrimaryCollection.call(this)) { _.each(this._collectionRenderingEvents, function(event) { // getEventCallback will resolve if it is a string or a method // and return a method collection.on(event[0], getEventCallback(event[1], this), event[2] || this); }, this); } else if (!collectionHelperPresentForPrimaryCollection.call(this)) { _.each(this._collectionRenderingEvents, function(event) { this.collection.off(event[0], getEventCallback(event[1], this), event[2] || this); }, this); } } function collectionHelperPresentForPrimaryCollection() { return this.collection && this.$('[' + primaryCollectionAttributeName + '="' + this.collection.cid + '"]').length; } function preserveCollectionElement(callback) { var oldCollectionElement = this.getCollectionElement(); callback.call(this); this.getCollectionElement().replaceWith(oldCollectionElement); } var collectionOptionNames = { 'item-template': 'itemTemplate', 'empty-template': 'emptyTemplate', 'item-view': 'itemView', 'empty-view': 'emptyView', 'empty-class': 'emptyClass' }; <<<<<<< ======= Thorax.View.on({ collection: { reset: function(collection) { var options = this._collectionOptionsByCid[collection.cid]; options.render && this.render(); }, error: function(collection, message) { var options = this._collectionOptionsByCid[collection.cid]; options.errors && this.trigger('error', message); } } }); Thorax.CollectionView.on({ collection: { filter: function() { applyVisibilityFilter.call(this); }, change: function(model) { //if we rendered with item views, model changes will be observed //by the generated item view but if we rendered with templates //then model changes need to be bound as nothing is watching if (!this.options['item-view']) { this.updateItem(model); } applyItemVisiblityFilter.call(this, model); }, add: function(model, collection) { this.collection.length === 1 && this.$el.length && handleChangeFromEmptyToNotEmpty.call(this); if (this.$el.length) { var index = collection.indexOf(model); this.appendItem(model, index); } }, remove: function(model /*, collection */) { this.$el.find('[' + modelCidAttributeName + '="' + model.cid + '"]').remove(); for (var cid in this.children) { if (this.children[cid].model && this.children[cid].model.cid === model.cid) { this.children[cid].destroy(); delete this.children[cid]; break; } } this.collection.length === 0 && this.$el.length && handleChangeFromNotEmptyToEmpty.call(this); } // collection.reset event registered in Thorax.View class } }); //item-template and empty-template are configured in the collection helper function configureCollectionViewOptions(view) { _.extend(view.options, { 'item-context': view.options['item-context'] || view.parent.itemContext, 'empty-context': view.options['empty-context'] || view.parent.emptyContext, 'empty-class': ('empty-class' in view.options) ? view.options['empty-class'] : 'empty' }); } >>>>>>>
<<<<<<< // 只预览图片格式。 if ( !file.type.match( /^image/ ) ) { cb( true ); return; } Image.makeThumbnail( file.getSource(), cb, width, height, true ); ======= Image.makeThumbnail( file.getSource(), cb, width, height, true, type, quality ); >>>>>>> // 只预览图片格式。 if ( !file.type.match( /^image/ ) ) { cb( true ); return; } Image.makeThumbnail( file.getSource(), cb, width, height, true, type, quality );
<<<<<<< var _getActiveTab = __webpack_require__(11); var _extend = __webpack_require__(4); ======= var _extend = __webpack_require__(5); >>>>>>> var _getActiveTab = __webpack_require__(11); var _extend = __webpack_require__(5); <<<<<<< /***/ 5: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var topics = {}; var _class = function () { function _class() { _classCallCheck(this, _class); } _createClass(_class, [{ key: 'on', value: function on(event, handler) { if (!topics[event]) topics[event] = []; topics[event].push(handler); } }, { key: 'emit', value: function emit(events) { var _this = this; for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } events = events.split(' '); var i = 0, l = events.length, topic = void 0; for (; i < l; i++) { topic = topics[events[i]]; if (topic) topic.forEach(function (handler) { return handler.apply(_this, args); }); } } }, { key: 'request', value: function request(event) { for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return browser.runtime.sendMessage({ ev: event, args: args, wait: true }).catch(function () {}); } }, { key: 'proxy', value: function proxy(context, func) { for (var _len3 = arguments.length, args1 = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) { args1[_key3 - 2] = arguments[_key3]; } return function () { for (var _len4 = arguments.length, args2 = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args2[_key4] = arguments[_key4]; } return func.apply(context, args1.concat(args2)); }; } }]); return _class; }(); exports.default = _class; /***/ }), /***/ 54: ======= /***/ 54: >>>>>>> /***/ 55: <<<<<<< /***/ 57: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _utils = __webpack_require__(0); new _utils._DOMMODULE({ el: document.getElementById('mark-actions'), events: { ENV: { 'clicked:mark': 'activate' }, DOM: { click: { '.mark-action': 'markAction' } } }, buttons: [], autoinit: function autoinit() { this.buttons = Array.from(this.el.getElementsByTagName('button')); }, markAction: function markAction(e, el) { var _this = this; if (el.hasAttribute('disabled')) return; (0, _utils._GET_ACTIVE_TAB)().then(function (tab) { return _this.emit('sidebar:' + el.getAttribute('data-action'), { tab: tab.id }); }); this.deactivate(); }, activate: function activate() { this.buttons.forEach(function (btn) { return btn.removeAttribute('disabled'); }); }, deactivate: function deactivate() { this.buttons.forEach(function (btn) { return btn.setAttribute('disabled', true); }); } }); /***/ }), /***/ 58: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _utils = __webpack_require__(0); var _store = __webpack_require__(59); var _store2 = _interopRequireDefault(_store); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } new _utils._DOMMODULE({ el: document.getElementById('page-actions'), events: { ENV: { 'started:app': 'update', 'updated:settings': 'update', 'toggled:sync-settings': 'update', 'updated:entry': 'deactivateSave', 'saved:entry': 'deactivateSave', 'unsaved-changes': 'activateSave' }, DOM: { click: { '.switch-toggle': 'onAutosaveSwitch', '.page-action': 'pageAction' } } }, autoinit: function autoinit() { var _this = this; _store2.default.get('autosave').then(function (autosave) { return _this.toggleAutosave(autosave); }); }, update: function update() {}, onAutosaveSwitch: function onAutosaveSwitch(e, el) { el = el.id === 'autosave-switch' ? el : el.parentNode; var autosave = !el.classList.contains('active'); this.toggleAutosave(autosave); this.emit('sidebar:toggle-autosave', autosave); }, toggleAutosave: function toggleAutosave(on) { var meth = on ? 'add' : 'remove'; document.getElementById('autosave-switch').classList[meth]('active'); document.getElementById('page-action--save').classList[meth]('none'); }, activateSave: function activateSave() { document.getElementById('page-action--save').removeAttribute('disabled'); }, deactivateSave: function deactivateSave() { document.getElementById('page-action--save').setAttribute('disabled', true); }, pageAction: function pageAction(e, el) { var _this2 = this; (0, _utils._GET_ACTIVE_TAB)().then(function (tab) { return _this2.emit('sidebar:' + el.getAttribute('data-action'), { tab: tab.id }); }); } }); /***/ }), /***/ 59: ======= /***/ 55: >>>>>>> /***/ 58: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _utils = __webpack_require__(0); new _utils._DOMMODULE({ el: document.getElementById('mark-actions'), events: { ENV: { 'clicked:mark': 'activate' }, DOM: { click: { '.mark-action': 'markAction' } } }, buttons: [], autoinit: function autoinit() { this.buttons = Array.from(this.el.getElementsByTagName('button')); }, markAction: function markAction(e, el) { var _this = this; if (el.hasAttribute('disabled')) return; (0, _utils._GET_ACTIVE_TAB)().then(function (tab) { return _this.emit('sidebar:' + el.getAttribute('data-action'), { tab: tab.id }); }); this.deactivate(); }, activate: function activate() { this.buttons.forEach(function (btn) { return btn.removeAttribute('disabled'); }); }, deactivate: function deactivate() { this.buttons.forEach(function (btn) { return btn.setAttribute('disabled', true); }); } }); /***/ }), /***/ 59: /***/ (function(module, exports, __webpack_require__) { "use strict"; var _utils = __webpack_require__(0); var _store = __webpack_require__(60); var _store2 = _interopRequireDefault(_store); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } new _utils._DOMMODULE({ el: document.getElementById('page-actions'), events: { ENV: { 'started:app': 'update', 'updated:settings': 'update', 'toggled:sync-settings': 'update', 'updated:entry': 'deactivateSave', 'saved:entry': 'deactivateSave', 'unsaved-changes': 'activateSave' }, DOM: { click: { '.switch-toggle': 'onAutosaveSwitch', '.page-action': 'pageAction' } } }, autoinit: function autoinit() { var _this = this; _store2.default.get('autosave').then(function (autosave) { return _this.toggleAutosave(autosave); }); }, update: function update() {}, onAutosaveSwitch: function onAutosaveSwitch(e, el) { el = el.id === 'autosave-switch' ? el : el.parentNode; var autosave = !el.classList.contains('active'); this.toggleAutosave(autosave); this.emit('sidebar:toggle-autosave', autosave); }, toggleAutosave: function toggleAutosave(on) { var meth = on ? 'add' : 'remove'; document.getElementById('autosave-switch').classList[meth]('active'); document.getElementById('page-action--save').classList[meth]('none'); }, activateSave: function activateSave() { document.getElementById('page-action--save').removeAttribute('disabled'); }, deactivateSave: function deactivateSave() { document.getElementById('page-action--save').setAttribute('disabled', true); }, pageAction: function pageAction(e, el) { var _this2 = this; (0, _utils._GET_ACTIVE_TAB)().then(function (tab) { return _this2.emit('sidebar:' + el.getAttribute('data-action'), { tab: tab.id }); }); } }); /***/ }), /***/ 6: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var topics = {}; var _class = function () { function _class() { _classCallCheck(this, _class); } _createClass(_class, [{ key: 'on', value: function on(event, handler) { if (!topics[event]) topics[event] = []; topics[event].push(handler); } }, { key: 'emit', value: function emit(events) { var _this = this; for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } events = events.split(' '); var i = 0, l = events.length, topic = void 0; for (; i < l; i++) { topic = topics[events[i]]; if (topic) topic.forEach(function (handler) { return handler.apply(_this, args); }); } } }, { key: 'request', value: function request(event) { for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return browser.runtime.sendMessage({ ev: event, args: args, wait: true }).catch(function () {}); } }, { key: 'proxy', value: function proxy(context, func) { for (var _len3 = arguments.length, args1 = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) { args1[_key3 - 2] = arguments[_key3]; } return function () { for (var _len4 = arguments.length, args2 = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args2[_key4] = arguments[_key4]; } return func.apply(context, args1.concat(args2)); }; } }]); return _class; }(); exports.default = _class; /***/ }), /***/ 60:
<<<<<<< import ColdHeartEfficiency from './Modules/Items/ColdHeartEfficiency'; ======= import Tier21_2p from './Modules/Items/Tier21_2p'; import Tier21_4p from './Modules/Items/Tier21_4p'; >>>>>>> import ColdHeartEfficiency from './Modules/Items/ColdHeartEfficiency'; import Tier21_2p from './Modules/Items/Tier21_2p'; import Tier21_4p from './Modules/Items/Tier21_4p'; <<<<<<< coldHeartEfficiency: ColdHeartEfficiency, ======= tier21_2p: Tier21_2p, tier21_4p: Tier21_4p, >>>>>>> coldHeartEfficiency: ColdHeartEfficiency, tier21_2p: Tier21_2p, tier21_4p: Tier21_4p,
<<<<<<< default: { script: series( 'nps banner.test', 'nps test.integration.pretest', 'nps test.integration.run' ) }, pretest: { script: 'tslint -c ./tslint.json -t stylish ./test/integration/**/*.ts' }, verbose: { script: 'nps "test.integration --verbose"' }, run: { // -i. Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests. This can be useful for debugging. script: 'cross-env NODE_ENV=test jest --testPathPattern=integration -i' }, ======= default: series( 'nps banner.test', 'nps test.integration.pretest', 'nps test.integration.run' ), pretest: 'tslint -c ./tslint.json -t stylish ./test/integration/**/*.ts', verbose: 'nps "test.integration --verbose"', run: 'cross-env NODE_ENV=test jest --testPathPattern=integration -i', >>>>>>> default: series( 'nps banner.test', 'nps test.integration.pretest', 'nps test.integration.run' ), pretest: 'tslint -c ./tslint.json -t stylish ./test/integration/**/*.ts', verbose: 'nps "test.integration --verbose"', // -i. Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests. This can be useful for debugging. run: 'cross-env NODE_ENV=test jest --testPathPattern=integration -i',
<<<<<<< var rawTypes = require("../lib/types"); ======= var builtin = types.builtInTypes var isRegExp = builtin.RegExp; var isString = builtin.string; >>>>>>> var builtin = types.builtInTypes var isRegExp = builtin.RegExp; var isString = builtin.string; var rawTypes = require("../lib/types");
<<<<<<< import { exec, spawn } from 'child_process'; import minimatch from 'minimatch'; ======= import {exec, spawn} from 'child_process'; import anymatch from 'anymatch'; >>>>>>> import { exec, spawn } from 'child_process'; import anymatch from 'anymatch';
<<<<<<< return { docs: [], resultsExhausted: true, totalCount: getTotalCount ? 0 : undefined, } ======= return { docs: [], resultsExhausted: true, isBadTerm: false} >>>>>>> return { docs: [], resultsExhausted: true, totalCount: getTotalCount ? 0 : undefined, isBadTerm: false } <<<<<<< const docs = await mapResultsToPouchDocs(results, { startDate, endDate }) ======= const docs = await mapResultsToPouchDocs(results, { startDate, endDate }, shouldSortByTime) >>>>>>> const docs = await mapResultsToPouchDocs(results, { startDate, endDate }) <<<<<<< resultsExhausted: false, totalCount: getTotalCount ? await index.count(indexQuery) : undefined, ======= resultsExhausted: results.length < limit, isBadTerm: false >>>>>>> resultsExhausted: false, totalCount: getTotalCount ? await index.count(indexQuery) : undefined, isBadTerm: false
<<<<<<< import maybeLogPageVisit from './log-page-visit' import debounce from 'lodash/debounce' ======= import { maybeLogPageVisit } from './log-page-visit' >>>>>>> import { maybeLogPageVisit } from './log-page-visit' import debounce from 'lodash/debounce'
<<<<<<< // Pattern to match entire string to `domain.tld`-like format + optional ccTLD const DOMAIN_TLD_PATTERN = /^\w{2,}\.\w{2,3}(\.\w{2})?$/ ======= import transform from '../util/transform-page-text.js' // Pattern to match entire string to `domain.tld`-like format const DOMAIN_TLD_PATTERN = /^\w{2,}\.\w{2,3}$/ >>>>>>> import transform from '../util/transform-page-text.js' // Pattern to match entire string to `domain.tld`-like format + optional ccTLD const DOMAIN_TLD_PATTERN = /^\w{2,}\.\w{2,3}(\.\w{2})?$/ <<<<<<< this.domain = [] ======= this.url = [] this.isBadTerm = false >>>>>>> this.domain = [] this.isBadTerm = false <<<<<<< // All EN stopwords are unindexed, so remove any from query terms terms = stopword.removeStopwords(terms, stopword.en) ======= // All terms must be pushed to the text-pipeline to take into account stopword removal ect... terms = (transform({text: terms.join(' '), lang: 'all'})).text.split(' ') >>>>>>> // All terms must be pushed to the text-pipeline to take into account stopword removal ect... terms = (transform({text: terms.join(' '), lang: 'all'})).text.split(' ') <<<<<<< if (DOMAIN_TLD_PATTERN.test(term)) { // Only can support single domain.tld search for now, so set to first index this.domain[0] = term } else { this.content.push(term) ======= if (term != ''){ if (DOMAIN_TLD_PATTERN.test(term)) { // Only can support single domain.tld search for now, so set to first index this.url[0] = term } else { this.content.push(term) } >>>>>>> if (term != ''){ if (DOMAIN_TLD_PATTERN.test(term)) { // Only can support single domain.tld search for now, so set to first index this.domain[0] = term } else { this.content.push(term) }
<<<<<<< export const SEARCH_COUNT_KEY = 'number-of-searches' export const EGG_TITLE = 'Cheers to the awesome crew that made Memex possible' export const EGG_URL = '/options/options.html#/acknowledgements' export const EGG_IMG = '/../../../../img/thanks.gif' ======= export const SEARCH_COUNT_KEY = 'number-of-searches' export const SHOWN_TAGS_LIMIT = 3 >>>>>>> export const SEARCH_COUNT_KEY = 'number-of-searches' export const EGG_TITLE = 'Cheers to the awesome crew that made Memex possible' export const EGG_URL = '/options/options.html#/acknowledgements' export const EGG_IMG = '/../../../../img/thanks.gif' export const SHOWN_TAGS_LIMIT = 3
<<<<<<< this.inspectMode = false; this.badges = []; ======= >>>>>>> this.inspectMode = false; <<<<<<< this.badges.forEach(badge => this.dom.badges.appendChild(badge.el) ); attachViewInspector(this); } else { for (let key in this.dom) { this.dom[key] = null; } ======= // cancel transitions on attach newContainerEl.style.transition = 'none'; requestAnimationFrame(() => newContainerEl.style.transition = ''); this.nav.render(this.dom.nav); >>>>>>> // cancel transitions on attach newContainerEl.style.transition = 'none'; requestAnimationFrame(() => newContainerEl.style.transition = ''); this.nav.render(this.dom.nav); attachViewInspector(this); } else { for (let key in this.dom) { this.dom[key] = null; }
<<<<<<< import hitext from 'hitext'; import hitextPrismjs from 'hitext-prismjs'; import CodeMirror from 'codemirror'; ======= import hitext from '/gen/hitext.js'; import hitextPrismjs from '/gen/hitext-prismjs.js'; import CodeMirror from '/gen/codemirror.js'; import usage from './source.usage.js'; >>>>>>> import hitext from 'hitext'; import hitextPrismjs from 'hitext-prismjs'; import CodeMirror from 'codemirror'; import usage from './source.usage.js';
<<<<<<< ======= function getPageMethod(host, pageId, name, fallback) { const method = getPageOption(host, pageId, name, fallback); return typeof method === 'function' ? method : fallback; } function extractValueLinkResolver(host, pageId) { const { resolveLink } = host.page.get(pageId).options; if (!resolveLink) { return; } switch (typeof resolveLink) { case 'string': const [type, ref = 'id'] = resolveLink.split(':'); return (entity) => { if (entity && entity.type === type) { return { type: pageId, text: entity.name, href: host.encodePageHash(pageId, entity[ref]), entity: entity.entity }; } }; case 'function': return (entity, value, data, context) => { if (!value) { return; } const link = resolveLink(entity, value, data, context); if (link) { return { type: pageId, text: typeof link === 'string' ? link : pageId, href: host.encodePageHash(pageId, link), entity: entity.entity }; } }; default: console.warn(`[Discovery] Page '${pageId}' has a bad value for resolveLink:`, resolveLink); } } >>>>>>> function getPageMethod(host, pageId, name, fallback) { const method = getPageOption(host, pageId, name, fallback); return typeof method === 'function' ? method : fallback; } function extractValueLinkResolver(host, pageId) { const { resolveLink } = host.page.get(pageId).options; if (!resolveLink) { return; } switch (typeof resolveLink) { case 'string': const [type, ref = 'id'] = resolveLink.split(':'); return (entity) => { if (entity && entity.type === type) { return { type: pageId, text: entity.name, href: host.encodePageHash(pageId, entity[ref]), entity: entity.entity }; } }; case 'function': return (entity, value, data, context) => { if (!value) { return; } const link = resolveLink(entity, value, data, context); if (link) { return { type: pageId, text: typeof link === 'string' ? link : pageId, href: host.encodePageHash(pageId, link), entity: entity.entity }; } }; default: console.warn(`[Discovery] Page '${pageId}' has a bad value for resolveLink:`, resolveLink); } } <<<<<<< this.prepare = data => data; ======= this.page.on('define', name => { this.addValueLinkResolver(extractValueLinkResolver(this, name)); // FIXME: temporary solution to avoid missed custom page's `decodeParams` method call on initial render if (this.pageId === name && this.pageHash !== '#') { const hash = this.pageHash; this.pageHash = '#'; this.setPageHash(hash); this.cancelScheduledRender(); } }); >>>>>>> this.page.on('define', name => { this.addValueLinkResolver(extractValueLinkResolver(this, name)); // FIXME: temporary solution to avoid missed custom page's `decodeParams` method call on initial render if (this.pageId === name && this.pageHash !== '#') { const hash = this.pageHash; this.pageHash = '#'; this.setPageHash(hash); this.cancelScheduledRender(); } }); this.prepare = data => data;
<<<<<<< var argv = require('yargs').argv; ======= var istanbul = require('gulp-istanbul'); var eslint = require('gulp-eslint'); var template = require('gulp-template'); var marked = require('marked'); var argv = require('yargs').argv; >>>>>>> var istanbul = require('gulp-istanbul'); var eslint = require('gulp-eslint'); var template = require('gulp-template'); var marked = require('marked'); var argv = require('yargs').argv; <<<<<<< remote: argv.remote, }, callback); ======= }); >>>>>>> remote: argv.remote, }, callback); });
<<<<<<< swPrecache.write(path.join(rootDir, 'offline-worker.js'), { staticFileGlobs: fileGlobs.map(function(v) { return path.join(rootDir, v) }), stripPrefix: rootDir, verbose: true, logger: gutil.log, importScripts: config.importScripts || [], maximumFileSizeToCacheInBytes: Infinity, }, callback); ======= ghslug('./').catch(function() { // Use the name from package.json if there's an error while fetching the GitHub slug. try { return JSON.parse(fs.readFileSync('package.json')).name; } catch (ex) { return ''; } }).then(function(cacheId) { swPrecache.write(path.join(rootDir, 'offline-worker.js'), { staticFileGlobs: fileGlobs.map(function(v) { return path.join(rootDir, v) }), stripPrefix: rootDir, verbose: true, logger: gutil.log, importScripts: config.importScripts || [], cacheId: cacheId, ignoreUrlParametersMatching: config.ignoreUrlParametersMatching || [/./], }, callback); }); >>>>>>> ghslug('./').catch(function() { // Use the name from package.json if there's an error while fetching the GitHub slug. try { return JSON.parse(fs.readFileSync('package.json')).name; } catch (ex) { return ''; } }).then(function(cacheId) { swPrecache.write(path.join(rootDir, 'offline-worker.js'), { staticFileGlobs: fileGlobs.map(function(v) { return path.join(rootDir, v) }), stripPrefix: rootDir, verbose: true, logger: gutil.log, importScripts: config.importScripts || [], cacheId: cacheId, ignoreUrlParametersMatching: config.ignoreUrlParametersMatching || [/./], maximumFileSizeToCacheInBytes: Infinity, }, callback); });
<<<<<<< var istanbul = require('gulp-istanbul'); ======= var argv = require('yargs').argv; >>>>>>> var istanbul = require('gulp-istanbul'); var argv = require('yargs').argv; <<<<<<< gulp.task('pre-test', function () { return gulp.src(['lib/**/*.js']) .pipe(istanbul({ includeUntested: true })) .pipe(istanbul.hookRequire()); }); gulp.task('test', ['pre-test'], function () { return gulp.src('test/test*.js', {read: false}) ======= gulp.task('test', function () { return gulp.src(argv.file ? argv.file : 'test/test*.js', {read: false}) >>>>>>> gulp.task('pre-test', function () { return gulp.src(['lib/**/*.js']) .pipe(istanbul({ includeUntested: true })) .pipe(istanbul.hookRequire()); }); gulp.task('test', ['pre-test'], function () { return gulp.src(argv.file ? argv.file : 'test/test*.js', {read: false})
<<<<<<< // Ensure root directory ends with slash so we strip leading slash from paths // of files to cache, so they're relative paths, and the offline worker // will match them regardless of whether the app is deployed to a top-level // directory for a custom domain (f.e. https://example.com/) or a subdirectory // of a GitHub Pages domain (f.e. https://mykmelez.github.io/example/). if (rootDir.lastIndexOf('/') !== rootDir.length -1) { rootDir = rootDir + '/'; } var fileGlobs = config.fileGlobs || ['**/*']; // Remove the existing service worker, if any, so sw-precache doesn't include // it in the list of files to cache. try { fs.unlinkSync(path.join(rootDir, 'offline-worker.js')); } catch (ex) { // Only ignore the error if it's a 'file not found' error. if (!ex.code || ex.code !== 'ENOENT') { throw ex; ======= // Ensure root directory ends with slash so we strip leading slash from paths // of files to cache, so they're relative paths, and the offline worker // will match them regardless of whether the app is deployed to a top-level // directory for a custom domain (f.e. https://example.com/) or a subdirectory // of a GitHub Pages domain (f.e. https://mykmelez.github.io/example/). if (rootDir.lastIndexOf('/') !== rootDir.length -1) { rootDir = rootDir + "/"; >>>>>>> // Ensure root directory ends with slash so we strip leading slash from paths // of files to cache, so they're relative paths, and the offline worker // will match them regardless of whether the app is deployed to a top-level // directory for a custom domain (f.e. https://example.com/) or a subdirectory // of a GitHub Pages domain (f.e. https://mykmelez.github.io/example/). if (rootDir.lastIndexOf('/') !== rootDir.length -1) { rootDir = rootDir + '/'; <<<<<<< }).then(function(cacheId) { var staticFileGlobs = fileGlobs.map(function(v) { return path.join(rootDir, v); }); ======= >>>>>>>
<<<<<<< import FathomDredgers from '../shared/modules/items/bfa/raids/crucibleofstorms/FathomDredgers'; ======= import HarbingersInscrutableWill from '../shared/modules/items/bfa/raids/crucibleofstorms/HarbingersInscrutableWill'; import IdolOfIndiscriminateConsumption from '../shared/modules/items/bfa/raids/crucibleofstorms/IdolOfIndiscriminateConsumption'; import GripsOfForsakenSanity from '../shared/modules/items/bfa/raids/crucibleofstorms/GripsOfForsakenSanity'; >>>>>>> import FathomDredgers from '../shared/modules/items/bfa/raids/crucibleofstorms/FathomDredgers'; import HarbingersInscrutableWill from '../shared/modules/items/bfa/raids/crucibleofstorms/HarbingersInscrutableWill'; import IdolOfIndiscriminateConsumption from '../shared/modules/items/bfa/raids/crucibleofstorms/IdolOfIndiscriminateConsumption'; import GripsOfForsakenSanity from '../shared/modules/items/bfa/raids/crucibleofstorms/GripsOfForsakenSanity'; <<<<<<< fathomDredgers: FathomDredgers, ======= harbingersInscrutableWill: HarbingersInscrutableWill, idolOfIndiscriminateConsumption: IdolOfIndiscriminateConsumption, gripsOfForsakenSanity: GripsOfForsakenSanity, >>>>>>> fathomDredgers: FathomDredgers, harbingersInscrutableWill: HarbingersInscrutableWill, idolOfIndiscriminateConsumption: IdolOfIndiscriminateConsumption, gripsOfForsakenSanity: GripsOfForsakenSanity,
<<<<<<< import TableOfContents from './table-of-contents' ======= import StatusLabel from './status-label' >>>>>>> import TableOfContents from './table-of-contents' import StatusLabel from './status-label' <<<<<<< {pageContext.tableOfContents.items ? ( <TableOfContents items={pageContext.tableOfContents.items} /> ) : null} ======= {pageContext.frontmatter.status ? ( <Box mb={4}> <StatusLabel status={pageContext.frontmatter.status} /> </Box> ) : null} >>>>>>> {pageContext.frontmatter.status ? ( <Box mb={4}> <StatusLabel status={pageContext.frontmatter.status} /> </Box> ) : null} {pageContext.tableOfContents.items ? ( <TableOfContents items={pageContext.tableOfContents.items} /> ) : null}
<<<<<<< import {MDXProvider} from '@mdx-js/react' import { BaseStyles, Box, Flex, Link, StyledOcticon, theme, } from '@primer/components' import {Pencil} from '@primer/octicons-react' ======= import {Flex} from '@primer/components' >>>>>>> import {Box, Flex, Link, StyledOcticon} from '@primer/components' import {Pencil} from '@primer/octicons-react' <<<<<<< <MDXProvider components={components}> <ThemeProvider theme={theme}> <BaseStyles> <Head title={pageContext.frontmatter.title} /> <Flex flexDirection="column" minHeight="100vh"> <Header /> <Flex flex="1 1 auto" flexDirection={['column', 'column', 'row']}> <Flex minWidth={240}> <Sidebar /> </Flex> <Box width="100%" maxWidth={960} p={5} mx="auto"> <H1>{pageContext.frontmatter.title}</H1> {children} {pageContext.editUrl ? ( <Box my={6}> <Link href={pageContext.editUrl}> <StyledOcticon icon={Pencil} mr={2} /> Edit this page on GitHub </Link> </Box> ) : null} </Box> </Flex> </Flex> </BaseStyles> </ThemeProvider> </MDXProvider> ======= <Flex flexDirection="column" minHeight="100vh"> <Head title={pageContext.frontmatter.title} /> <Header /> <Flex flex="1 1 auto" flexDirection={['column', 'column', 'row']}> <Sidebar /> <Container> <H1>{pageContext.frontmatter.title}</H1> {children} </Container> </Flex> </Flex> >>>>>>> <Flex flexDirection="column" minHeight="100vh"> <Head title={pageContext.frontmatter.title} /> <Header /> <Flex flex="1 1 auto" flexDirection={['column', 'column', 'row']}> <Sidebar /> <Container> <H1>{pageContext.frontmatter.title}</H1> {children} {pageContext.editUrl ? ( <Box my={6}> <Link href={pageContext.editUrl}> <StyledOcticon icon={Pencil} mr={2} /> Edit this page on GitHub </Link> </Box> ) : null} </Container> </Flex> </Flex>
<<<<<<< // client not authorized in session yet // TODO: strategies // - authorize once per session // - pass everyone // - check account model () => { if (!ctx.oidc.session.sidFor(ctx.oidc.client.clientId)) { return { error: 'consent_required', error_description: 'client not authorized for End-User session yet', reason: 'client_not_authorized', }; } return false; }, ======= >>>>>>>
<<<<<<< it("child view re-render will keep dom events intact", function() { var callCount = 0; var parent = new Thorax.View({ name: 'parent-event-dom-test', child: new Thorax.View({ name: 'child-event-dom-test', events: { 'click .test': function() { ++callCount; } }, template: function() { return '<div class="test"></div>'; } }), template: "{{view child}}" ======= it("template passed to constructor and view block", function() { var view = new Thorax.View({ template: '<p>{{key}}</p>', key: 'value' }); view.render(); expect(view.$('p').html()).to.equal('value'); var view = new (Thorax.View.extend({ template: '<p>{{key}}</p>', key: 'value' }))(); view.render(); expect(view.$('p').html()).to.equal('value'); var Child = Thorax.View.extend({ template: '<div class="child-a">{{key}}</div>', key: 'value' }); var a = new Child(); var b = new Child(); var parent = new Thorax.View({ template: '<div class="parent">{{#view b}}<div class="child-b">{{key}}</div>{{/view}}{{view a}}</div>', a: a, b: b }); parent.render(); expect(parent.$('.child-a').length).to.equal(1); expect(parent.$('.child-a').html()).to.equal('value'); expect(parent.$('.child-b').length).to.equal(1); expect(parent.$('.child-b').html()).to.equal('value'); //ensure that override does not persist to view itself b.render(); expect(b.$('.child-a').html()).to.equal('value'); //test nesting var outer = new Thorax.View({ template: '<div class="a">{{#view inner}}<div class="b">{{#view child}}<div class="c">value</div>{{/view}}</div>{{/view}}</div>', inner: new Thorax.View({ child: new Thorax.View() }) }); outer.render(); expect(outer.$('.c').html()).to.equal('value'); }); // TODO: The bug and test to ensure it is fixed is limited to jQuery // The test fails on PhantomJS running the zepto tests for unknown // reasons. The test passes on Zepto when run directly in a browser. // It is disabled for now as it does not affect Zepto. if (typeof jQuery !== 'undefined' && $ === jQuery) { it("child view re-render will keep dom events intact", function() { var callCount = 0; var parent = new Thorax.View({ name: 'parent-event-dom-test', child: new Thorax.View({ name: 'child-event-dom-test', events: { 'click .test': function() { ++callCount; } }, template: function() { return '<div class="test"></div>'; } }), template: "{{view child}}" }); parent.render(); document.body.appendChild(parent.el); parent.child.$('.test').trigger('click'); expect(callCount).to.equal(1); parent.render(); parent.child.$('.test').trigger('click'); expect(callCount).to.equal(2); $(parent.el).remove(); >>>>>>> it("template passed to constructor and view block", function() { var view = new Thorax.View({ template: '<p>{{key}}</p>', key: 'value' }); view.render(); expect(view.$('p').html()).to.equal('value'); var view = new (Thorax.View.extend({ template: '<p>{{key}}</p>', key: 'value' }))(); view.render(); expect(view.$('p').html()).to.equal('value'); var Child = Thorax.View.extend({ template: '<div class="child-a">{{key}}</div>', key: 'value' }); var a = new Child(); var b = new Child(); var parent = new Thorax.View({ template: '<div class="parent">{{#view b}}<div class="child-b">{{key}}</div>{{/view}}{{view a}}</div>', a: a, b: b }); parent.render(); expect(parent.$('.child-a').length).to.equal(1); expect(parent.$('.child-a').html()).to.equal('value'); expect(parent.$('.child-b').length).to.equal(1); expect(parent.$('.child-b').html()).to.equal('value'); //ensure that override does not persist to view itself b.render(); expect(b.$('.child-a').html()).to.equal('value'); //test nesting var outer = new Thorax.View({ template: '<div class="a">{{#view inner}}<div class="b">{{#view child}}<div class="c">value</div>{{/view}}</div>{{/view}}</div>', inner: new Thorax.View({ child: new Thorax.View() }) }); outer.render(); expect(outer.$('.c').html()).to.equal('value'); }); it("child view re-render will keep dom events intact", function() { var callCount = 0; var parent = new Thorax.View({ name: 'parent-event-dom-test', child: new Thorax.View({ name: 'child-event-dom-test', events: { 'click .test': function() { ++callCount; } }, template: function() { return '<div class="test"></div>'; } }), template: "{{view child}}"
<<<<<<< async function validateInitialAccessToken(ctx, next) { ======= const idFactory = instance(provider).configuration('features.registration.idFactory') || uuid; assert.equal(typeof idFactory, 'function', 'idFactory must be a function'); function* validateInitialAccessToken(next) { >>>>>>> const idFactory = instance(provider).configuration('features.registration.idFactory') || uuid; assert.equal(typeof idFactory, 'function', 'idFactory must be a function'); async function validateInitialAccessToken(ctx, next) {
<<<<<<< module.exports = function getErrorHandler(provider, emittedError) { return async function apiErrorHandler(ctx, next) { ======= module.exports = function getErrorHandler(provider, eventName) { return function* apiErrorHandler(next) { >>>>>>> module.exports = function getErrorHandler(provider, eventName) { return async function apiErrorHandler(ctx, next) { <<<<<<< if (emittedError) { provider.emit(out.error === 'server_error' ? 'server_error' : emittedError, err, ctx); ======= if (out.error === 'server_error') { provider.emit('server_error', err, this); } else if (eventName) { provider.emit(eventName, err, this); >>>>>>> if (out.error === 'server_error') { provider.emit('server_error', err, ctx); } else if (eventName) { provider.emit(eventName, err, ctx);
<<<<<<< ctx.oidc.session.acrValue = result.login.acr; ctx.oidc.session.account = result.login.account; ctx.oidc.session.loginTs = result.login.ts; ======= this.oidc.session.account = result.login.account; this.oidc.session.loginTs = result.login.ts; >>>>>>> ctx.oidc.session.account = result.login.account; ctx.oidc.session.loginTs = result.login.ts;
<<<<<<< const Koa = require('koa'); const path = require('path'); const render = require('koa-ejs'); const co = require('co'); ======= const koa = require('koa'); >>>>>>> const Koa = require('koa'); <<<<<<< render(app, { cache: false, layout: '_layout', root: path.join(__dirname, '..', 'views'), }); app.context.render = co.wrap(app.context.render); ======= >>>>>>>
<<<<<<< await provider.initialize(); const server = http.createServer(provider.app.callback()).listen(); ======= yield provider.initialize(); >>>>>>> await provider.initialize();
<<<<<<< return async function renderConfiguration(ctx, next) { ctx.body = { acr_values_supported: config.acrValues, authorization_endpoint: ctx.oidc.urlFor('authorization'), ======= return function* renderConfiguration(next) { this.body = { acr_values_supported: config.acrValues.length ? config.acrValues : undefined, authorization_endpoint: this.oidc.urlFor('authorization'), >>>>>>> return async function renderConfiguration(ctx, next) { ctx.body = { acr_values_supported: config.acrValues.length ? config.acrValues : undefined, authorization_endpoint: ctx.oidc.urlFor('authorization'),
<<<<<<< async function validateInitialAccessToken(ctx, next) { const setup = instance(provider).configuration('features.registration'); switch (setup.initialAccessToken && typeof setup.initialAccessToken) { ======= function* validateInitialAccessToken(next) { const registration = instance(provider).configuration('features.registration'); switch (registration.initialAccessToken && typeof registration.initialAccessToken) { >>>>>>> async function validateInitialAccessToken(ctx, next) { const registration = instance(provider).configuration('features.registration'); switch (registration.initialAccessToken && typeof registration.initialAccessToken) { <<<<<<< new Buffer(setup.initialAccessToken, 'utf8'), new Buffer(ctx.oidc.bearer, 'utf8'), ======= new Buffer(registration.initialAccessToken, 'utf8'), new Buffer(this.oidc.bearer, 'utf8'), >>>>>>> new Buffer(registration.initialAccessToken, 'utf8'), new Buffer(ctx.oidc.bearer, 'utf8'), <<<<<<< ctx.oidc.client = client; ======= this.oidc.client = client; this.oidc.registrationAccessToken = regAccessToken; >>>>>>> ctx.oidc.client = client; ctx.oidc.registrationAccessToken = regAccessToken; <<<<<<< provider.emit('registration_update.success', ctx.oidc.client, ctx); ======= >>>>>>> <<<<<<< await next(); ======= const management = instance(provider).configuration('features.registrationManagement'); if (management.rotateRegistrationAccessToken) { const rat = new provider.RegistrationAccessToken({ clientId: this.oidc.client.clientId }); yield this.oidc.registrationAccessToken.destroy(); this.oidc.registrationAccessToken = rat; this.body.registration_access_token = yield rat.save(); } provider.emit('registration_update.success', this.oidc.client, this); yield next; >>>>>>> const management = instance(provider).configuration('features.registrationManagement'); if (management.rotateRegistrationAccessToken) { const rat = new provider.RegistrationAccessToken({ clientId: ctx.oidc.client.clientId }); await ctx.oidc.registrationAccessToken.destroy(); ctx.oidc.registrationAccessToken = rat; ctx.body.registration_access_token = await rat.save(); } provider.emit('registration_update.success', ctx.oidc.client, ctx); await next();
<<<<<<< test("multiple collections", function() { ======= it("programmatic access to CollectionView", function() { var parent = new Thorax.View({ template: '{{view child}}' }); parent.child = new Thorax.CollectionView({ tagName: 'ul', parent: parent, 'item-template': 'letter-item' }); parent.child.setCollection(letterCollection); parent.render(); expect(parent.$('ul').length).to.equal(1); expect(parent.child.parent).to.equal(parent); expect(parent.$('li').length).to.equal(letterCollection.length); }); it("multiple collections", function() { >>>>>>> it("multiple collections", function() { <<<<<<< test("collection-element helper", function() { var view = new Thorax.View({ collection: letterCollection, template: '<div class="test">{{collection-element tag="ul"}}</div>', itemTemplate: 'letter-item' }); equal(view.$('li').length, letterCollection.length); }); test("graceful failure of empty collection with no empty template", function() { ======= it("graceful failure of empty collection with no empty template", function() { >>>>>>> it("collection-element helper", function() { var view = new Thorax.View({ collection: letterCollection, template: '<div class="test">{{collection-element tag="ul"}}</div>', itemTemplate: 'letter-item' }); expect(view.$('li').length).to.equal(letterCollection.length); }); it("graceful failure of empty collection with no empty template", function() { <<<<<<< ======= template: "{{#collection this.collection item-context=myItemContext}}<span>{{test}}</span>{{/collection}}", myItemContext: function() { return { test: 'testing' }; } }); view.render(); expect(view.$('span').length).to.equal(letterCollection.length); expect(view.$('span')[0].innerHTML).to.equal('testing'); //will use default view = new Thorax.View({ collection: letterCollection, >>>>>>> <<<<<<< //will use default ======= view = new Thorax.View({ collection: new (Thorax.Collection.extend({ url: false, isEmpty: function() { return true; } }))(), template: "{{#collection this.collection empty-context=\"myEmptyContext\"}}{{test}}{{else}}<b>{{test}}</b>{{/collection}}", myEmptyContext: function() { return { test: 'testing' }; } }); view.render(); expect(view.$('b')[0].innerHTML).to.equal('testing'); //uses default >>>>>>> //will use default <<<<<<< ======= it("pass CollectionView to Layout", function() { var layout = new Thorax.LayoutView(); var collection = new Thorax.Collection([new Thorax.Model({ key: 'value' })]); var view = new Thorax.CollectionView({ tagName: 'ul', parent: layout, 'item-template': Handlebars.compile('<li>{{key}}</li>') }); view.setCollection(collection); layout.setView(view); expect(layout.$('li').html()).to.equal('value'); }); >>>>>>>
<<<<<<< uuid: ctx.oidc.uuid, returnTo: ctx.oidc.urlFor('resume', { grant: ctx.oidc.uuid }), params: ctx.oidc.params, ======= uuid: ctx.uuid, params: ctx.params, >>>>>>> uuid: ctx.oidc.uuid, params: ctx.oidc.params, <<<<<<< ctx.cookies.set('_grant', j(ctx.oidc.params), Object.assign({ path: provider.pathFor('resume', { grant: ctx.oidc.uuid }), ======= this.cookies.set('_grant', j(ctx.params), Object.assign({ path: url.parse(returnTo).pathname, >>>>>>> ctx.cookies.set('_grant', j(ctx.oidc.params), Object.assign({ path: url.parse(returnTo).pathname,
<<<<<<< import SPELLS from 'common/SPELLS'; import { SpellIcon } from 'interface'; ======= >>>>>>> import SPELLS from 'common/SPELLS'; <<<<<<< ======= import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER'; import STATISTIC_CATEGORY from 'parser/ui/STATISTIC_CATEGORY'; import BoringSpellValue from 'parser/ui/BoringSpellValue'; import Statistic from 'parser/ui/Statistic'; >>>>>>> <<<<<<< statisticOrder = STATISTIC_ORDER.CORE(13); ======= >>>>>>>
<<<<<<< multiparty = require("connect-multiparty"), ======= sslConfig = require("ssl-config")("intermediate"), >>>>>>> multiparty = require("connect-multiparty"), sslConfig = require("ssl-config")("intermediate"), <<<<<<< appServer = https.createServer({key: fs.readFileSync(config.key), cert: fs.readFileSync(config.cert)}, app); ======= app = express.createServer({key: fs.readFileSync(config.key), cert: fs.readFileSync(config.cert), ciphers: sslConfig.ciphers, honorCipherOrder: true, secureOptions: sslConfig.minimumTLSVersion}); >>>>>>> appServer = https.createServer({key: fs.readFileSync(config.key), cert: fs.readFileSync(config.cert), ciphers: sslConfig.ciphers, honorCipherOrder: true, secureOptions: sslConfig.minimumTLSVersion}, app); <<<<<<< app.use(express.static(path.resolve(__dirname, "../public"))); ======= app.use(versionStamp); app.use(helmet({ contentSecurityPolicy: { directives: { "default-src": "'self'", "script-src": ["'self'", "'unsafe-inline'", "'unsafe-eval'"].concat(config.noCDN ? [] : ["cdnjs.cloudflare.com", "ajax.googleapis.com"]), "style-src": ["'self'", "'unsafe-inline'"].concat(config.noCDN ? [] : ["cdnjs.cloudflare.com"]), "img-src": "*", "object-src": ["'none'"], "media-src": "*", "child-src": ["'self'", "www.youtube.com"], "frame-ancestors": ["'none'"], "plugin-types": ["'none'"] } }, dnsPrefetchControl: false, frameguard: {action: "deny"}, hidePoweredBy: false, hsts: false })); >>>>>>> app.use(express.static(path.resolve(__dirname, "../public")));
<<<<<<< 'views/youtube/PlaylistsViewer', ======= 'views/SidebarView', 'views/Loader', // 'views/infinite_scroller', >>>>>>> 'views/youtube/PlaylistsViewer', 'views/SidebarView', 'views/Loader', // 'views/infinite_scroller', <<<<<<< FacebookLikeView, PlaylistsViewer, ======= FacebookLikeView, SidebarView, Loader, // InfiniteScroll, >>>>>>> FacebookLikeView, PlaylistsViewer, SidebarView, Loader, // InfiniteScroll, <<<<<<< this.views.searchBar = new MediaSearch({ model: this.model }); this.views.youtubePlayer = new YoutubePlayer({ model: this.model }); this.views.contentView = new ContentLayoutView({ model: this.model }); this.views.resultsNav = new ResultsNavigation({ model: this.model }); // this.views.historyPlaylistData = new HistoryPlaylist(); this.views.searchFeedFilter = new FeedFilter({ model: this.model }); this.views.userPlaylists = new YoutubePlaylistsProvider({ model: this.model }); this.views.userProfileManager = new UserProfileManager({ model: this.model }); this.views.facebookLikeView = new FacebookLikeView({ model: this.model }); this.views.playlistsViewer = new PlaylistsViewer({ model: this.model }); // set correct heights ======= this.views = { searchBar: new MediaSearch({ model: this.model }), youtubePlayer: new YoutubePlayer({ model: this.model }), contentView: new ContentLayoutView({ model: this.model }), resultsNav: new ResultsNavigation({ model: this.model }), // historyPlaylistData: new HistoryPlaylist() searchFeedFilter: new FeedFilter({ model: this.model }), userPlaylists: new YoutubePlaylistsProvider({ model: this.model }), userProfileManager: new UserProfileManager({ model: this.model }), facebookLikeView: new FacebookLikeView({ model: this.model }), sidebarToggle: new SidebarView({ model: this.model }), loader: new Loader({ model: this.model }) // infiniteScroll: new InfiniteScroll({ model: this.model }) }; // set correct height >>>>>>> this.views = { searchBar: new MediaSearch({ model: this.model }), youtubePlayer: new YoutubePlayer({ model: this.model }), contentView: new ContentLayoutView({ model: this.model }), resultsNav: new ResultsNavigation({ model: this.model }), // historyPlaylistData: new HistoryPlaylist() searchFeedFilter: new FeedFilter({ model: this.model }), userPlaylists: new YoutubePlaylistsProvider({ model: this.model }), userProfileManager: new UserProfileManager({ model: this.model }), facebookLikeView: new FacebookLikeView({ model: this.model }), sidebarToggle: new SidebarView({ model: this.model }), loader: new Loader({ model: this.model }), playlistsViewer: new PlaylistsViewer({ model: this.model }) // infiniteScroll: new InfiniteScroll({ model: this.model }) }; // set correct height
<<<<<<< './youtube_player', './gapi', './youtube/gplusAuth' ======= './youtube_player' >>>>>>> './youtube_player', './gapi', './youtube/gplusAuth' <<<<<<< this.set('mediaId', null); ======= >>>>>>>
<<<<<<< on_server = fs.existsSync( `/etc/letsencrypt/live/${domain_name}/fullchain.pem` ) ======= >>>>>>> <<<<<<< if (on_server) { cert = { cert: fs.readFileSync( `/etc/letsencrypt/live/${domain_name}/fullchain.pem` ), key: fs.readFileSync(`/etc/letsencrypt/live/${domain_name}/privkey.pem`) } var server = require('https').createServer(cert, cb) // redirecting from http:// if (base_port == 443) { require('http') .createServer(function(req, res) { res.writeHead(301, {Location: 'https://' + req.headers['host']}) res.end() }) .listen(80) } } else { cert = false var server = require('http').createServer(cb) } ======= cert = false var server = require('http').createServer(cb) >>>>>>> cert = false var server = require('http').createServer(cb)
<<<<<<< ======= var PeersManagementResource = require('./api_resources/peer_management'); >>>>>>> var PeersManagementResource = require('./api_resources/peer_management'); <<<<<<< .add(RootResource, zettaInstance) .add(DevicesResource, zettaInstance) .add(ServersResource, zettaInstance) ======= .add(RootResource, server) .add(PeersManagementResource, server) .add(DevicesResource, server) .add(ServersResource, server) >>>>>>> .add(RootResource, zettaInstance) .add(DevicesResource, zettaInstance) .add(ServersResource, zettaInstance) .add(PeersManagementResource, zettaInstance)
<<<<<<< this.machine.buildStreamLinks = this.buildStreamLinks.bind(this.machine); this.machine.streams = []; ======= this.machine.streams = {}; >>>>>>> this.machine.buildStreamLinks = this.buildStreamLinks.bind(this.machine); this.machine.streams = {}; <<<<<<< return actions; }; ======= Object.keys(self.streams).forEach(function(name) { var fields = []; fields.push({ name: 'name', type: 'hidden', value: name }); >>>>>>> return actions; };
<<<<<<< this.recentMessagesAtTop = params.recentMessagesAtTop || false; ======= this.position = params.position || 'bottom'; >>>>>>> this.recentMessagesAtTop = params.recentMessagesAtTop || false; this.position = params.position || 'bottom';
<<<<<<< if (this.position === 'bottom') { this.panel = atom.workspace.addBottomPanel({item: this}); } else if (this.position === 'top') { this.panel = atom.workspace.addTopPanel({item: this}); } ======= this.panel = atom.workspace.addBottomPanel({item: this}); var that = this; this.panel.item.on("mousedown", ".panel-resize-handle", function () { that.resizeStarted(); }); $(".panel-body", this).css({ maxHeight: this.maxHeight }); >>>>>>> if (this.position === 'bottom') { this.panel = atom.workspace.addBottomPanel({item: this}); } else if (this.position === 'top') { this.panel = atom.workspace.addTopPanel({item: this}); } var that = this; this.panel.item.on("mousedown", ".panel-resize-handle", function () { that.resizeStarted(); }); $(".panel-body", this).css({ maxHeight: this.maxHeight });
<<<<<<< /** * LineMessageView class * * Is capable of displaying a message with a line:char * reference, and an optional preview of the code on * that line. * * Takes a hash of parameters that include: * - `line`: The line this message relates to * - `character`: Which character on the line (optional) * - `message`: The message itself * - `preview`: An optional preview of the code * - `className`: Optionally adds a class-name */ function LineMessageView(params) { this.line = params.line; this.character = params.character || undefined; this.message = params.message; this.preview = params.preview || undefined; this.className = params.className || undefined; ======= var LineMessageView = function (params) { this.line = params.line; this.character = params.character; this.message = params.message; this.preview = params.preview || undefined; this.className = params.className || undefined; View.apply(this, arguments); }; >>>>>>> var LineMessageView = function (params) { this.line = params.line; this.character = params.character || undefined; this.message = params.message; this.preview = params.preview || undefined; this.className = params.className || undefined; View.apply(this, arguments); }; <<<<<<< var char = (this.character !== undefined) ? this.character - 1 : 0; atom.workspace.getActiveEditor().cursors[0].setBufferPosition([this.line - 1, char]); ======= atom.workspace.getActiveEditor().cursors[0].setBufferPosition([this.line - 1, this.character - 1]); >>>>>>> var char = (this.character !== undefined) ? this.character - 1 : 0; atom.workspace.getActiveEditor().cursors[0].setBufferPosition([this.line - 1, char]); <<<<<<< var message = 'at line ' + this.line; if (this.character !== undefined) { message += ', character ' + this.character; } this.position.text(message); this.contents.text(this.message); if (this.className) { this.contents.addClass(this.className); } ======= this.position.text('at line ' + this.line + ', character ' + this.character); this.contents.text(this.message); if (this.className) { this.contents.addClass(this.className); } >>>>>>> var message = 'at line ' + this.line; if (this.character !== undefined) { message += ', character ' + this.character; } this.position.text(message); this.contents.text(this.message); if (this.className) { this.contents.addClass(this.className); } <<<<<<< var pos = this.line; if (this.character !== undefined) { pos += ', ' + this.character; } return { summary: pos + ': ' + this.message, className: this.className }; ======= return { summary: this.line + ', ' + this.character + ': ' + this.message, className: this.className }; >>>>>>> var pos = this.line; if (this.character !== undefined) { pos += ', ' + this.character; } return { summary: pos + ': ' + this.message, className: this.className };
<<<<<<< //NOTE - currently this.name will always be truthy if (!locals.noScript) params.script ='bundles/' + this.name + '.js'; ======= params.stylesheet = getStaticUrl('stylesheets/index.css'); params.script = getStaticUrl('js/bundles/' + this.name + '.js'); // IDEA for generic bundle page >>>>>>> params.stylesheet = getStaticUrl('stylesheets/index.css'); if (!locals.noScript) params.script = getStaticUrl('js/bundles/' + this.name + '.js'); // IDEA for generic bundle page
<<<<<<< var ice_api = require('./ice_api'); var buf = require('./buffer_utils'); ======= var dbg = require('./dbg')(__filename); // dbg.log_level = 3; >>>>>>> var ice_api = require('./ice_api'); var buf = require('./buffer_utils'); var dbg = require('./dbg')(__filename); // dbg.log_level = 3; <<<<<<< if (options.path.indexOf('block') >= 0) { // do ice writeLog(self.options, 'do ice ' + (self.options.ws_socket ? self.options.ws_socket.idInServer : "not agent") + ' for path '+options.path); return Q.fcall(function() { var peerId = options.hostname + ":" + options.port; var buffer; if (options.headers['content-type'] === 'application/json') { options.body = body; } else { buffer = body; } return ice_api.sendRequest(self.options.ws_socket, peerId, options, null, buffer); }) .then(function(res) { writeLog(self.options, 'res is: '+ require('util').inspect(res)); if (!func_info.reply_raw) { // check the json reply validate_schema(res.data, func_info.reply_schema, func_info, 'client reply'); } return res.data; }) .then(null, function(err) { console.error('REST REQUEST FAILED '+ err.stack); }) .catch(function(err) { console.error('REST REQUEST CATCH '+ err.stack); }); } else { // do http writeLog(self.options, 'do http req '+options.path); return Q.fcall(function() { return self._http_request(options, body); }).then(read_http_response) .then(function(res) { return self._handle_http_reply(func_info, res); }) .then(null, function(err) { console.error('REST REQUEST FAILED', err); throw err; }); } }; function writeLog(options, msg) { if (options.ws_socket) { console.error(msg); } else { console.log(msg); } } // create a REST api call and return the options for http request. Client.prototype._http_request = function(options, body) { var req = options.protocol === 'https:' ? ======= dbg.log2('HTTP request options', options); var req = self.options.protocol === 'https:' ? >>>>>>> if (self.options.peer) { // do ice writeLog(self.options, 'do ice ' + (self.options.ws_socket ? self.options.ws_socket.idInServer : "not agent") + ' for path '+options.path); return Q.fcall(function() { var peerId = self.options.peer; var buffer; if (options.headers['content-type'] === 'application/json') { options.body = body; } else { buffer = body; } return ice_api.sendRequest(self.options.ws_socket, peerId, options, null, buffer); }) .then(function(res) { writeLog(self.options, 'res is: '+ require('util').inspect(res)); if (!func_info.reply_raw) { // check the json reply validate_schema(res.data, func_info.reply_schema, func_info, 'client reply'); } return res.data; }) .then(null, function(err) { console.error('REST REQUEST FAILED '+ err.stack); }) .catch(function(err) { console.error('REST REQUEST CATCH '+ err.stack); }); } else { // do http writeLog(self.options, 'do http req '+options.path); return Q.fcall(function() { return self._http_request(options, body); }).then(read_http_response) .then(function(res) { return self._handle_http_reply(func_info, res); }) .then(null, function(err) { console.error('REST REQUEST FAILED', err); throw err; }); } }; function writeLog(options, msg) { if (options.ws_socket) { console.error(msg); } else { console.log(msg); } } // create a REST api call and return the options for http request. Client.prototype._http_request = function(options, body) { var req = options.protocol === 'https:' ?
<<<<<<< node: params.node_id, ======= system: params.node.system._id, node: params.node._id, >>>>>>> system: params.node.system._id, node: params.node_id,
<<<<<<< ======= var node_listen_addr = 'n2n://' + node.peer_id; dbg.log3('PEER REVERSE ADDRESS', node_listen_addr, req.connection.url.href); //Add node to RPC map and notify redirector if needed var notify_redirector = server_rpc.map_address_to_connection(node_listen_addr, req.connection); if (notify_redirector) { req.connection.on('close', _unregister_agent.bind(this, req.connection, node.peer_id)); P.fcall(function() { return bg_worker.redirector.register_agent({ peer_id: node.peer_id, }); }) .fail(function(error) { dbg.log0('Failed to register agent', error); _resync_agents(); }); } >>>>>>>
<<<<<<< api_schema.register_api(require('./lambda_api')); api_schema.register_api(require('./lambda_node_api')); ======= api_schema.register_api(require('./frontend_notifications_api')); >>>>>>> api_schema.register_api(require('./frontend_notifications_api')); api_schema.register_api(require('./lambda_api')); api_schema.register_api(require('./lambda_node_api'));
<<<<<<< var native_core = require("../util/native_core")(); var dedup_chunker = new native_core.DedupChunker({ tpool: new native_core.ThreadPool(1) }, new native_core.DedupConfig({})); var object_coding = new native_core.ObjectCoding({ tpool: new native_core.ThreadPool(2), ======= var native_util = require("bindings")("native_util.node"); var dedup_chunker = new native_util.DedupChunker({ tpool: new native_util.ThreadPool(1) }); var object_coding_tpool = new native_util.ThreadPool(2); var object_coding = new native_util.ObjectCoding({ >>>>>>> var native_core = require("../util/native_core")(); var dedup_chunker = new native_core.DedupChunker({ tpool: new native_core.ThreadPool(1) }, new native_core.DedupConfig({})); var object_coding_tpool = new native_util.ThreadPool(2); var object_coding = new native_core.ObjectCoding({
<<<<<<< api.pool.create_pool({ name, nodes }) .then(loadSystemInfo) ======= let { poolList } = model; api.pool.create_nodes_pool({ name, nodes }) .then( () => loadPoolList(poolList.sortedBy(), poolList.order()) ) >>>>>>> api.pool.create_nodes_pool({ name, nodes }) .then(loadSystemInfo)
<<<<<<< last_stats_report: system.last_stats_report && new Date(system.last_stats_report), ======= maintenance_mode: system_utils.system_in_maintenance(system._id) ? new Date(system.maintenance_mode) : undefined, >>>>>>> last_stats_report: system.last_stats_report && new Date(system.last_stats_report), maintenance_mode: system_utils.system_in_maintenance(system._id) ? new Date(system.maintenance_mode) : undefined,
<<<<<<< if (req.header('range')){ return client.object_client.serve_http_stream(req,res,object_path); }else{ client.object_client.open_read_stream(object_path).pipe(res); ======= if (req.header('range')) { return clients[access_key].object_client.serve_http_stream(req, res, object_path); } else { var stream = clients[access_key].object_client.open_read_stream(object_path).pipe(res); >>>>>>> if (req.header('range')) { clients[access_key].object_client.serve_http_stream(req, res, object_path); } else { clients[access_key].object_client.open_read_stream(object_path).pipe(res); <<<<<<< client.object_client.open_read_stream(object_path).pipe(res); ======= var stream = clients[access_key].object_client.open_read_stream(object_path).pipe(res); >>>>>>> clients[access_key].object_client.open_read_stream(object_path).pipe(res);
<<<<<<< const tier_pools_by_id = _.keyBy(tier.pools, '_id'); var replicas = chunk.is_special? tier.replicas * SPECIAL_CHUNK_REPLICA_MULTIPLIER : tier.replicas; ======= // when allocating blocks for upload we want to ignore cloud_pools // so the client is not blocked until all blocks are uploded to the cloud. // on build_chunks flow we will not ignore cloud pools. const participating_pools = ignore_cloud_pools ? _.filter(tier.pools, pool => _.isUndefined(pool.cloud_pool_info)) : tier.pools; const tier_pools_by_id = _.keyBy(participating_pools, '_id'); const replicas = tier.replicas; >>>>>>> // when allocating blocks for upload we want to ignore cloud_pools // so the client is not blocked until all blocks are uploded to the cloud. // on build_chunks flow we will not ignore cloud pools. const participating_pools = ignore_cloud_pools ? _.filter(tier.pools, pool => _.isUndefined(pool.cloud_pool_info)) : tier.pools; const tier_pools_by_id = _.keyBy(participating_pools, '_id'); var replicas = chunk.is_special? tier.replicas * SPECIAL_CHUNK_REPLICA_MULTIPLIER : tier.replicas;
<<<<<<< last_stats_report: { format: 'idate' }, ======= maintenance_mode: { // type: 'object', // additionalProperties: true, // properties: {} format: 'idate' }, >>>>>>> last_stats_report: { format: 'idate' }, maintenance_mode: { // type: 'object', // additionalProperties: true, // properties: {} format: 'idate' },
<<<<<<< ======= gulp.task('client_libs', ['bower'], function() { var DEST = 'build/public/js'; var NAME = 'libs.js'; var NAME_MIN = 'libs.min.js'; var bundler = browserify({ debug: true, }); _.each(PATHS.client_libs, function(lib) { bundler.require(lib, { expose: lib }); }); // using gulp_replace to fix collision of requires var client_libs_bundle_stream = bundler.bundle() .pipe(vinyl_source_stream(NAME)) .pipe(vinyl_buffer()); var client_merged_stream = event_stream.merge( client_libs_bundle_stream, gulp.src(PATHS.client_externals) ); return client_merged_stream .pipe(gulp_plumber(PLUMB_CONF)) .pipe(gulp_concat(NAME)) .pipe(gulp_size_log(NAME)) .pipe(gulp.dest(DEST)) .pipe(gulp_cached(NAME)) .pipe(gulp_uglify()) .pipe(gulp_rename(NAME_MIN)) .pipe(gulp_size_log(NAME_MIN)) .pipe(gulp.dest(DEST)); }); gulp.task('client', ['ng'], function() { var DEST = 'build/public/js'; var NAME = 'app.js'; var NAME_MIN = 'app.min.js'; var bundler = browserify('./' + PATHS.client_bundle, { debug: true, }) .transform('babelify', { presets: ['es2015'] }); _.each(PATHS.client_libs, function(lib) { bundler.external(lib); }); gutil.log('setting upgrade', pkg.version, current_pkg_version); return bundler.bundle() .pipe(vinyl_source_stream(NAME)) .pipe(vinyl_buffer()) .pipe(gulp_replace('"version": "' + pkg.version + '"', '"version": "' + current_pkg_version + '"')) .pipe(gulp_plumber(PLUMB_CONF)) .pipe(gulp_size_log(NAME)) .pipe(gulp.dest(DEST)) .pipe(gulp_cached(NAME)) .pipe(gulp_uglify()) .pipe(gulp_replace('noobaa-core",version:"' + pkg.version + '"', 'noobaa-core",version:"' + current_pkg_version + '"')) .pipe(gulp_rename(NAME_MIN)) .pipe(gulp_size_log(NAME_MIN)) .pipe(gulp.dest(DEST)); }); var basepath = path.resolve(__dirname); >>>>>>> var basepath = path.resolve(__dirname); <<<<<<< return gulp.src(PATHS.js_for_coverage) ======= return gulp .src(PATHS.js_for_coverage) .pipe(through2.obj(function(file, enc, callback) { if (file.path.startsWith(basepath)) { file.path = file.path.slice(basepath.length + 1 /*for / seperator*/ ); } this.push(file); callback(); })) >>>>>>> return gulp.src(PATHS.js_for_coverage) .pipe(through2.obj(function(file, enc, callback) { if (file.path.startsWith(basepath)) { file.path = file.path.slice(basepath.length + 1 /*for / seperator*/ ); } this.push(file); callback(); }))
<<<<<<< const promise_utils = require('../../util/promise_utils'); ======= const cloud_utils = require('../utils/cloud_utils'); const moment = require('moment'); >>>>>>> const cloud_utils = require('../utils/cloud_utils'); const moment = require('moment'); const promise_utils = require('../../util/promise_utils'); <<<<<<< // /** // * return a regexp pattern to be appended to a prefix // * to make it match "prefix/file" or "prefix/dir/" // * but with a custom delimiter instead of / // * @param delimiter - a single character. // */ // function one_level_delimiter(delimiter) { // var d = string_utils.escapeRegExp(delimiter[0]); // return '[^' + d + ']*' + d + '?$'; // } // // /** // * common case is / as delimiter // */ // var ONE_LEVEL_SLASH_DELIMITER = one_level_delimiter('/'); // function list_objects_s3(req) { dbg.log0('list_objects_s3', req.rpc_params); ======= load_bucket(req); // TODO: change it to perform changes in one transaction. Won't scale. return list_objects(req) .then(items => { dbg.log0('objects by prefix', items.objects); if (items.objects.length > 0) { return P.all(_.map(items.objects, function(single_object) { dbg.log0('single obj deleted:', single_object.key); return P.fcall(() => { var query = { system: req.system._id, bucket: req.bucket._id, key: single_object.key }; return md_store.ObjectMD.findOne(query).exec(); }) .then(obj => mongo_utils.check_entity_not_found(obj, 'object')) .then(obj => delete_object_internal(obj)); })).return(); } }) .return(); } /** * return a regexp pattern to be appended to a prefix * to make it match "prefix/file" or "prefix/dir/" * but with a custom delimiter instead of / * @param delimiter - a single character. */ function one_level_delimiter(delimiter) { var d = string_utils.escapeRegExp(delimiter[0]); return '[^' + d + ']*' + d + '?$'; } /** * common case is / as delimiter */ var ONE_LEVEL_SLASH_DELIMITER = one_level_delimiter('/'); /** * * LIST_OBJECTS * */ function list_objects(req) { dbg.log0('list_objects', req.rpc_params); >>>>>>> load_bucket(req); // TODO: change it to perform changes in one transaction. Won't scale. return list_objects(req) .then(items => { dbg.log0('objects by prefix', items.objects); if (items.objects.length > 0) { return P.all(_.map(items.objects, function(single_object) { dbg.log0('single obj deleted:', single_object.key); return P.fcall(() => { var query = { system: req.system._id, bucket: req.bucket._id, key: single_object.key }; return md_store.ObjectMD.findOne(query).exec(); }) .then(obj => mongo_utils.check_entity_not_found(obj, 'object')) .then(obj => delete_object_internal(obj)); })).return(); } }) .return(); } // /** // * return a regexp pattern to be appended to a prefix // * to make it match "prefix/file" or "prefix/dir/" // * but with a custom delimiter instead of / // * @param delimiter - a single character. // */ // function one_level_delimiter(delimiter) { // var d = string_utils.escapeRegExp(delimiter[0]); // return '[^' + d + ']*' + d + '?$'; // } // // /** // * common case is / as delimiter // */ // var ONE_LEVEL_SLASH_DELIMITER = one_level_delimiter('/'); // function list_objects_s3(req) { dbg.log0('list_objects_s3', req.rpc_params); <<<<<<< }); } else { var find = md_store.ObjectMD.find(query); if (limit) { find.limit(limit); } find.sort({ key: 1 }); return find.lean().exec() .then(res => { return _.map(res, obj => ({ key: obj.key, info: get_object_info(obj) })); }); } }); } function list_objects(req) { dbg.log0('list_objects', req.rpc_params); load_bucket(req); return P.fcall(() => { var info = _.omit(object_md_query(req), 'key'); if (req.rpc_params.key_query) { ======= } else if (prefix) { info.key = new RegExp('^' + escaped_prefix); if (req.rpc_params.create_time) { let creation_date = moment.unix(req.rpc_params.create_time).toISOString(); info.create_time = { $lt: new Date(creation_date) }; } } else if (req.rpc_params.key_query) { >>>>>>> }); } else { var find = md_store.ObjectMD.find(query); if (limit) { find.limit(limit); } find.sort({ key: 1 }); return find.lean().exec() .then(res => { return _.map(res, obj => ({ key: obj.key, info: get_object_info(obj) })); }); } }); } function list_objects(req) { dbg.log0('list_objects', req.rpc_params); var prefix = req.rpc_params.prefix || ''; let escaped_prefix = string_utils.escapeRegExp(prefix); load_bucket(req); return P.fcall(() => { var info = _.omit(object_md_query(req), 'key'); if (prefix) { info.key = new RegExp('^' + escaped_prefix); if (req.rpc_params.create_time) { let creation_date = moment.unix(req.rpc_params.create_time).toISOString(); info.create_time = { $lt: new Date(creation_date) }; } } else if (req.rpc_params.key_query) { <<<<<<< exports.list_objects_s3 = list_objects_s3; ======= exports.delete_multiple_objects_by_prefix = delete_multiple_objects_by_prefix; >>>>>>> exports.delete_multiple_objects_by_prefix = delete_multiple_objects_by_prefix;
<<<<<<< apply_set_debug_level: { method: 'POST', params: { type: 'object', required: ['level'], properties: { target_secret: { type: 'string', }, level: { type: 'integer', } }, }, auth: { system: 'admin', } }, collect_server_diagnostics: { method: 'POST', params: { type: 'object', properties: { target_secret: { type: 'string', } }, }, reply: { type: 'object', required: ['data'], properties: { data: { buffer: true }, }, }, auth: { system: 'admin', } }, read_server_time: { ======= apply_read_server_time: { >>>>>>> apply_set_debug_level: { method: 'POST', params: { type: 'object', required: ['level'], properties: { target_secret: { type: 'string', }, level: { type: 'integer', } }, }, auth: { system: 'admin', } }, collect_server_diagnostics: { method: 'POST', params: { type: 'object', properties: { target_secret: { type: 'string', } }, }, reply: { type: 'object', required: ['data'], properties: { data: { buffer: true }, }, }, auth: { system: 'admin', } }, apply_read_server_time: {
<<<<<<< // var ip_module = require('ip'); // var time_utils = require('../util/time_utils'); var url_utils = require('../util/url_utils'); ======= >>>>>>> // var ip_module = require('ip'); // var time_utils = require('../util/time_utils'); var url_utils = require('../util/url_utils'); <<<<<<< req.reqid = msg.header.reqid; ======= var rseq = conn._rpc_req_seq || 1; conn._rpc_req_seq = rseq + 1; req.reqid = msg.header.reqid ? msg.header.reqid : (rseq + '@' + conn.connid); >>>>>>> req.reqid = msg.header.reqid; <<<<<<< var conn = this._get_connection(addr_url, req.srv); req.connection = conn; req.reqid = conn._alloc_reqid(); conn._sent_requests[req.reqid] = req; ======= var conn = this._get_connection(addr_url, req.srv, options.force_redirect); if (conn !== null) { var rseq = conn._rpc_req_seq; req.connection = conn; req.reqid = rseq + '@' + conn.connid; conn._rpc_req_seq = rseq + 1; conn._sent_requests[req.reqid] = req; } >>>>>>> var conn = this._get_connection(addr_url, req.srv, options.force_redirect); if (conn !== null) { req.connection = conn; req.reqid = conn._alloc_reqid(); conn._sent_requests[req.reqid] = req; } <<<<<<< if (conn) { if (conn.is_closed()) { dbg.log0('RPC _assign_connection: remove stale connection', ======= if (conn && !force_redirect) { if (conn.closed) { dbg.log2('RPC _assign_connection: remove stale connection', >>>>>>> if (conn && !force_redirect) { if (conn.is_closed()) { dbg.log0('RPC _assign_connection: remove stale connection',
<<<<<<< import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; import SPELLS from 'common/SPELLS'; ======= import React from 'react'; import Module from 'Parser/Core/Module'; import HIT_TYPES from "Parser/Core/HIT_TYPES"; import Combatants from "Parser/Core/Modules/Combatants"; import SPELLS from "common/SPELLS/HUNTER"; import TALENTS from 'common/SPELLS/TALENTS/HUNTER'; import StatisticBox from "Main/StatisticBox"; import SpellLink from "common/SpellLink"; import SpellIcon from "common/SpellIcon"; import Icon from "common/Icon"; import { formatNumber, formatPercentage } from "common/format"; >>>>>>> import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import HIT_TYPES from "Parser/Core/HIT_TYPES"; import Combatants from "Parser/Core/Modules/Combatants"; import SPELLS from "common/SPELLS/HUNTER"; import TALENTS from 'common/SPELLS/TALENTS/HUNTER'; import StatisticBox from "Main/StatisticBox"; import SpellLink from "common/SpellLink"; import SpellIcon from "common/SpellIcon"; import Icon from "common/Icon"; import { formatNumber, formatPercentage } from "common/format";
<<<<<<< const outputTasks = [ markdownWriter(schemaMap[schemaKey].filePath, object.mSchema, schemaPath, docDir, object.dep, docs) ]; if (schemaDir !== '') { outputTasks.push(schemaWriter(schemaMap[schemaKey].filePath, object.wSchema, schemaPath, schemaDir)); } return Promise.all(outputTasks); ======= return Promise.all([ markdownWriter(schemaMap[schemaKey].filePath, object.mSchema, schemaPath, docDir, object.dep, docs), schemaWriter(schemaMap[schemaKey].filePath, object.wSchema, schemaPath, schemaDir) ]); }).catch(err => { logger.error('Error occured in processing schema at path %s', sPath); logger.error(err); // should we exit here or allow processing of other schemas? process.exit(1); >>>>>>> const outputTasks = [ markdownWriter(schemaMap[schemaKey].filePath, object.mSchema, schemaPath, docDir, object.dep, docs) ]; if (schemaDir !== '') { outputTasks.push(schemaWriter(schemaMap[schemaKey].filePath, object.wSchema, schemaPath, schemaDir)); } return Promise.all(outputTasks); }).catch(err => { logger.error('Error occured in processing schema at path %s', sPath); logger.error(err); // should we exit here or allow processing of other schemas? process.exit(1);
<<<<<<< set_last_stats_report_time: { doc: 'Set last stats report sync time', method: 'PUT', params: { type: 'object', required: ['last_stats_report'], properties: { last_stats_report: { format: 'idate', }, } }, auth: { system: 'admin', } }, ======= export_activity_log: { method: 'GET', params: { type: 'object', required: [], properties: { event: { type: 'string', }, events: { type: 'array', items: { type: 'string' } }, till: { format: 'idate' }, since: { format: 'idate' } } }, reply: { type: 'object', required: ['csv_path'], properties: { csv_path: { type: 'string' }, } }, auth: { system: 'admin', } }, >>>>>>> set_last_stats_report_time: { doc: 'Set last stats report sync time', method: 'PUT', params: { type: 'object', required: ['last_stats_report'], properties: { last_stats_report: { format: 'idate', }, } }, auth: { system: 'admin', } }, export_activity_log: { method: 'GET', params: { type: 'object', required: [], properties: { event: { type: 'string', }, events: { type: 'array', items: { type: 'string' } }, till: { format: 'idate' }, since: { format: 'idate' } } }, reply: { type: 'object', required: ['csv_path'], properties: { csv_path: { type: 'string' }, } }, auth: { system: 'admin', } },
<<<<<<< ======= //Global Configuration and Initialization console.log('loading .env file ( no foreman ;)'); dotenv.load(); dbg.set_process_name('BGWorkers'); >>>>>>> dbg.set_process_name('BGWorkers'); <<<<<<< return P.ninvoke(http_server, 'listen', bg_workers_rpc.get_default_base_port('background')); ======= return P.ninvoke(http_server, 'listen', (parseInt(process.env.PORT) + 1)); >>>>>>> return P.ninvoke(http_server, 'listen', bg_workers_rpc.get_default_base_port('background'));
<<<<<<< .then(() => coretest.init_test_nodes(client, SYS, 6)) .then(() => client.node.list_nodes({})) .then(res => { nodes_list = res.nodes; }) .then(res => client.pool.create_pool({ ======= .then(() => client.auth.create_auth({ email: EMAIL, password: PASSWORD, system: SYS, role: 'create_node' })) .then(res => promise_utils.loop(10, i => client.node.heartbeat({ name: 'node' + i }, { auth_token: res.token }))) .then(() => client.pool.create_nodes_pool({ >>>>>>> .then(() => coretest.init_test_nodes(client, SYS, 6)) .then(() => client.node.list_nodes({})) .then(res => { nodes_list = res.nodes; }) .then(() => client.pool.create_nodes_pool({
<<<<<<< .get("/theme.css", (ctx) => { const theme = ctx.cookies.get("theme") || defaultTheme; ======= .get("/theme.css", ctx => { const theme = ctx.cookies.get("theme") || config.theme; >>>>>>> .get("/theme.css", (ctx) => { const theme = ctx.cookies.get("theme") || config.theme; <<<<<<< .get("/settings/", async (ctx) => { const theme = ctx.cookies.get("theme") || defaultTheme; ======= .get("/settings/", async ctx => { const theme = ctx.cookies.get("theme") || config.theme; >>>>>>> .get("/settings/", async (ctx) => { const theme = ctx.cookies.get("theme") || config.theme;
<<<<<<< ======= const { isEmpty } = require('lodash') const logger = require('./logger') >>>>>>> const logger = require('./logger') <<<<<<< function handleWarning (message) { // eslint-disable-next-line console.warn('\x1b[33m', `(Firebase-Module) ${message}`) } function handleError (message) { // TODO: Delete warning by the end of 2019 handleWarning( `Firebase-Module 3.0.0 introduced a new layout of the configuration for this module. Check out the Changelogs to see what changed and reconfigure your options accordingly. See: https://github.com/@nuxtjs/firebase/releases/tag/v3.0.0` ) throw new Error(`(Firebase-Module) ${message}`) } function isEmpty (val) { return val == null || !(Object.keys(val) || val).length } ======= >>>>>>>
<<<<<<< }) test('match body with form multipart', function(t) { nock('http://encodingsareus.com') .post('/', "--fixboundary\r\nContent-Disposition: form-data; name=\"field\"\r\n\r\nvalue\r\n--fixboundary--\r\n") .reply(200); var r = mikealRequest({ url: 'http://encodingsareus.com/', method: 'post', }, function(err, res) { if (err) throw err; assert.equal(res.statusCode, 200); t.end(); }); var form = r.form(); form._boundary = 'fixboundary'; // fix boundary so that request could match at all form.append('field', 'value'); }); ======= t.end(); }); >>>>>>> t.end(); }); test('match body with form multipart', function(t) { nock('http://encodingsareus.com') .post('/', "--fixboundary\r\nContent-Disposition: form-data; name=\"field\"\r\n\r\nvalue\r\n--fixboundary--\r\n") .reply(200); var r = mikealRequest({ url: 'http://encodingsareus.com/', method: 'post', }, function(err, res) { if (err) throw err; assert.equal(res.statusCode, 200); t.end(); }); var form = r.form(); form._boundary = 'fixboundary'; // fix boundary so that request could match at all form.append('field', 'value'); });
<<<<<<< menu.extension(fileFormatToUse, function(format) { if (format === '.html') { createHtml(resumeJson, fileName, theme, format, function() { callback(null, fileName, format); }); } else if (format === '.pdf') { createPdf(resumeJson, fileName, theme, format, function() { callback(null, fileName, format); }); } }); }); } else { ======= >>>>>>> <<<<<<< menu.extension(fileFormatToUse, function(format) { if (format === '.html') { createHtml(resumeJson, fileName, theme, format, function() { callback(null, fileName, format); }); } else if (format === '.pdf') { createPdf(resumeJson, fileName, theme, format, function() { ======= if (format === '.html') { sendExportRequest(resumeJson, fileName, theme, format, function() { callback(null, fileName, format); }); } else if (format === '.pdf') { sendExportPDFRequest(resumeJson, fileName, theme, format, function() { >>>>>>> if (format === '.html') { sendExportRequest(resumeJson, fileName, theme, format, function() { callback(null, fileName, format); }); } else if (format === '.pdf') { sendExportPDFRequest(resumeJson, fileName, theme, format, function() {
<<<<<<< var area = require('./../area/area'); var messageService = require('../messageService'); ======= >>>>>>>
<<<<<<< /* const isValidName = (name) => { ======= const isValidName = name => { >>>>>>> /* const isValidName = name => { <<<<<<< */ //const isValidEnum = (values) => !values.find((val => !isValidName(val))); //export const getEnumType = (typeName, fieldName) => `${typeName}${capitalize(unarrayfyFieldName(fieldName))}Enum`; ======= // const isValidEnum = values => !values.find(val => !isValidName(val)); // get GraphQL type for a nested object (<MainTypeName><FieldName> e.g PostAuthor, EventAdress, etc.) export const getNestedGraphQLType = (typeName, fieldName, isInput) => `${typeName}${capitalize(unarrayfyFieldName(fieldName))}${isInput ? 'Input' : ''}`; // export const getEnumType = (typeName, fieldName) => `${typeName}${capitalize(unarrayfyFieldName(fieldName))}Enum`; >>>>>>> */ // const isValidEnum = values => !values.find(val => !isValidName(val)); // export const getEnumType = (typeName, fieldName) => `${typeName}${capitalize(unarrayfyFieldName(fieldName))}Enum`; <<<<<<< /* Getting Enums from allowed values is counter productive because enums syntax is limited @see https://github.com/VulcanJS/Vulcan/issues/2332 if (hasAllowedValues(field) && isValidEnum(getAllowedValues(field))) { return getEnumType(typeName, fieldName); }*/ ======= // if (hasAllowedValues(field) && isValidEnum(getAllowedValues(field))) { // return getEnumType(typeName, fieldName); // } >>>>>>> /* Getting Enums from allowed values is counter productive because enums syntax is limited @see https://github.com/VulcanJS/Vulcan/issues/2332 if (hasAllowedValues(field) && isValidEnum(getAllowedValues(field))) { return getEnumType(typeName, fieldName); }*/ <<<<<<< // Support for enums from allowedValues has been removed (counter-productive) ======= >>>>>>> // Support for enums from allowedValues has been removed (counter-productive) <<<<<<< /*if (hasAllowedValues(field)) { const allowedValues = getAllowedValues(field); // TODO: we can't force value creation //if (!isValidEnum(allowedValues)) throw new Error(`Allowed values of field ${ fieldName } can not be used as enum. //One or more values are not respecting the Name regex`) // ignore arrays containing invalid values if (isValidEnum(allowedValues)) { fields.enums.push({// allowedValues, typeName: getEnumType(typeName, fieldName) }); } else { console.warn(`Warning: Allowed values of field ${fieldName} can not be used as GraphQL Enum. One or more values are not respecting the Name regex.Consider normalizing allowedValues and using separate labels for displaying.`); } } */ ======= // if (hasAllowedValues(field)) { // const allowedValues = getAllowedValues(field); // // TODO: we can't force value creation // //if (!isValidEnum(allowedValues)) throw new Error(`Allowed values of field ${ fieldName } can not be used as enum. // //One or more values are not respecting the Name regex: /[_A-Za-z][_0-9A-Za-z]*/.`)//; // // ignore arrays containing invalid values // if (isValidEnum(allowedValues)) { // fields.enums.push({// // allowedValues, // typeName: getEnumType(typeName, fieldName) // }); // } else { // console.warn(`Warning: Allowed values of field ${fieldName} can not be used as GraphQL Enum. One or more values are not respecting the Name regex: /[_A-Za-z][_0-9A-Za-z]*/. Consider normalizing allowedValues and using separate labels for displaying.`); // } // } if (typeName === 'Schema') { console.log(fieldName, hasNesting); } >>>>>>> /*if (hasAllowedValues(field)) { const allowedValues = getAllowedValues(field); // TODO: we can't force value creation //if (!isValidEnum(allowedValues)) throw new Error(`Allowed values of field ${ fieldName } can not be used as enum. //One or more values are not respecting the Name regex`) // ignore arrays containing invalid values if (isValidEnum(allowedValues)) { fields.enums.push({// allowedValues, typeName: getEnumType(typeName, fieldName) }); } else { console.warn(`Warning: Allowed values of field ${fieldName} can not be used as GraphQL Enum. One or more values are not respecting the Name regex.Consider normalizing allowedValues and using separate labels for displaying.`); } } */
<<<<<<< FIND_APPROVED = function() { return queryFind(STATUS_APPROVED, Session.get('categorySlug')); } FIND_PENDING = function() { return queryFind(STATUS_PENDING, Session.get('categorySlug')); } var topPostsHandle = postListSubscription(FIND_APPROVED, sortBy('score'), 10); var newPostsHandle = postListSubscription(FIND_APPROVED, sortBy('submitted'), 10); var bestPostsHandle = postListSubscription(FIND_APPROVED, sortBy('baseScore'), 10); var pendingPostsHandle = postListSubscription(FIND_PENDING, sortBy('createdAt'), 10); ======= topPostsHandle = postListSubscription(FIND_APPROVED, {sort: {sticky: -1, score: -1}}, 10); newPostsHandle = postListSubscription(FIND_APPROVED, {sort: {sticky: -1, submitted: -1}}, 10); bestPostsHandle = postListSubscription(FIND_APPROVED, {sort: {sticky: -1, baseScore: -1}}, 10); pendingPostsHandle = postListSubscription( {$or: [{status: STATUS_PENDING}, {status: STATUS_REJECTED}]}, {sort: {createdAt: -1}}, 10 ); >>>>>>> FIND_APPROVED = function() { return queryFind(STATUS_APPROVED, Session.get('categorySlug')); } FIND_PENDING = function() { return queryFind(STATUS_PENDING, Session.get('categorySlug')); } topPostsHandle = postListSubscription(FIND_APPROVED, sortBy('score'), 10); newPostsHandle = postListSubscription(FIND_APPROVED, sortBy('submitted'), 10); bestPostsHandle = postListSubscription(FIND_APPROVED, sortBy('baseScore'), 10); pendingPostsHandle = postListSubscription(FIND_PENDING, sortBy('createdAt'), 10);
<<<<<<< options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit; options.skip = terms.offset; // keep only fields that should be viewable by current user ======= options.limit = (limit < 1 || limit > 100) ? 100 : limit; options.skip = offset; >>>>>>> options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit; options.skip = terms.offset;
<<<<<<< export { default as ScrollToTop } from './components/ScrollToTop.jsx'; ======= export { default as Dummy } from './components/Dummy.jsx'; >>>>>>> export { default as ScrollToTop } from './components/ScrollToTop.jsx'; export { default as Dummy } from './components/Dummy.jsx';
<<<<<<< try { MailChimpList.add(user, false, function (error, result) { console.log(error); console.log(result); }); } catch (error) { console.log("// MailChimp Error:") console.log(error) } ======= MailChimpList.add(user, false, function (error, result) { console.log(error); // eslint-disable-line console.log(result); // eslint-disable-line }); >>>>>>> try { MailChimpList.add(user, false, function (error, result) { console.log(error); // eslint-disable-line console.log(result); // eslint-disable-line }); } catch (error) { console.log("// MailChimp Error:") // eslint-disable-line console.log(error) // eslint-disable-line }
<<<<<<< doc = await Connectors.get(collection, selector, options); ======= doc = await Connectors.get(collection, selector); // check again that the fields used for filtering were all valid, this time based on retrieved document // this second check is necessary for document based permissions like canRead:["owners", customFunctionThatNeedDoc] Users.checkFields(currentUser, collection, filteredFields, doc); >>>>>>> doc = await Connectors.get(collection, selector, options); // check again that the fields used for filtering were all valid, this time based on retrieved document // this second check is necessary for document based permissions like canRead:["owners", customFunctionThatNeedDoc] Users.checkFields(currentUser, collection, filteredFields, doc);