code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/app/shared/components/Wallet/Panel/Button/Broadcast.js b/app/shared/components/Wallet/Panel/Button/Broadcast.js @@ -15,17 +15,23 @@ class WalletPanelButtonBroadcast extends Component<Props> { t, transaction } = this.props; + let { + button + } = this.props; + if (!button) { + button = { + color: 'purple', + content: t('wallet_panel_wallet_broadcast'), + fluid: true, + icon: 'wifi' + }; + } return ( <GlobalTransactionModal actionName="TRANSACTION_BROADCAST" actions={actions} blockExplorers={blockExplorers} - button={{ - color: 'purple', - content: t('wallet_panel_wallet_broadcast'), - fluid: true, - icon: 'wifi' - }} + button={button} content={( <WalletModalContentBroadcast actions={actions}
11
diff --git a/src/components/inspectors/advancedAccordionConfig.js b/src/components/inspectors/advancedAccordionConfig.js @@ -8,7 +8,7 @@ export default { initiallyOpen: false, label: 'Advanced', icon: 'cogs', - name: 'inspector-accordion', + name: 'advanced-accordion', }, items: [ {
10
diff --git a/modules/site/parent_templates/site/common/js/application.js b/modules/site/parent_templates/site/common/js/application.js @@ -856,17 +856,13 @@ function parseContent(pageIndex, checkSection){ } //add the section header - var extraTitle = authorSupport == true && $(this).attr('hidePageInfo') != undefined && $(this).attr('hidePageInfo') != '' ? ' <span class="alertMsg">' + $(this).attr('hidePageInfo') + '</span>' : ''; + var extraTitle = authorSupport == true && $(this).attr('hidePageInfo') != undefined && $(this).attr('hidePageInfo') != '' ? ' <span class="alertMsg">' + $(this).attr('hidePageInfo') + '</span>' : '', + links = $(this).attr('links') != undefined && $(this).attr('links') != "none" ? '<div class="sectionSubLinks ' + $(this).attr('links') + '"></div>' : '', + subHeadings = ($(this).attr('menu') != 'menu' && $(this).attr('menu') != 'neither') ? '<h1>' + $(this).attr('name') + '</h1>' : ''; - var links = ''; + var pageHeader = subHeadings + extraTitle + links != '' ? '<div class="page-header">' + subHeadings + extraTitle + links + '</div>' : ''; - if ($(this).attr('links') != undefined && $(this).attr('links') != "none") { - links = '<div class="sectionSubLinks ' + $(this).attr('links') + '"></div>'; - } - - var subHeadings = ($(this).attr('menu') != 'menu' && $(this).attr('menu') != 'neither') ? '<h1>' + $(this).attr('name') + '</h1>' : ''; - - var section = $('<section id="page' + (pageIndex+1) + 'section' + (index+1) + '"><div class="page-header">' + subHeadings + extraTitle + links + '</div></section>'); + var section = $('<section id="page' + (pageIndex+1) + 'section' + (index+1) + '">' + pageHeader + '</section>'); //add the section contents $(this).children().each( function(index, value){
7
diff --git a/src/Document.js b/src/Document.js @@ -197,7 +197,7 @@ function initDocument (document, window) { window.dispatchEvent(new Event('load', {target: window})); const displays = window.navigator.getVRDisplaysSync(); - if (displays.length > 0) { + if (displays.length > 0 && !['all', 'webvr'].includes(GlobalContext.args.xr)) { const _initDisplays = () => { if (!_tryEmitDisplay()) { _delayFrames(() => { @@ -218,7 +218,6 @@ function initDocument (document, window) { } }; const _emitOneDisplay = display => { - if (GlobalContext.args.xr === 'none') return; const e = new window.Event('vrdisplayactivate'); e.display = display; window.dispatchEvent(e);
5
diff --git a/sirepo/package_data/static/js/sirepo-plotting.js b/sirepo/package_data/static/js/sirepo-plotting.js @@ -575,8 +575,8 @@ function plotAxis(margin, dimension, orientation, refresh, utilities) { else { tickCount = Math.min(MAX_TICKS, Math.round(canvasSize.height / (5 * FONT_SIZE))); } - format = d3.format(calcFormat(tickCount > 2 ? tickCount : 2, unit)); - if ((orientation == 'left' || orientation == 'right') && plotAxis.allowUpdates) { + format = d3.format(calcFormat(Math.max(2, tickCount), unit)); + if ((orientation == 'left' || orientation == 'right')) { var w = Math.max(format(applyUnit(d[0], unit)).length, format(applyUnit(d[1], unit)).length); margin[orientation] = (w + 6) * (FONT_SIZE / 2); } @@ -610,7 +610,7 @@ function plotAxis(margin, dimension, orientation, refresh, utilities) { self.createZoom = function() { return d3.behavior.zoom()[dimension](self.scale) .on('zoom', function() { - // don't update the plot margins during zoom/pad + // don't update the plot margins during zoom/pan plotAxis.allowUpdates = false; refresh(); plotAxis.allowUpdates = true; @@ -981,6 +981,7 @@ SIREPO.app.directive('plot2d', function(plotting, utilities) { if (! axes.x.domain) { return; } + if (plotAxis.allowUpdates) { var width = parseInt(select().style('width')) - $scope.margin.left - $scope.margin.right; if (! points || isNaN(width)) { return; @@ -994,7 +995,7 @@ SIREPO.app.directive('plot2d', function(plotting, utilities) { axes.y.scale.range([$scope.height, 0]); axes.x.grid.tickSize(-$scope.height); axes.y.grid.tickSize(-$scope.width); - + } if (plotting.trimDomain(axes.x.scale, axes.x.domain)) { select('.overlay').attr('class', 'overlay mouse-zoom'); axes.y.scale.domain(axes.y.domain).nice(); @@ -1295,6 +1296,7 @@ SIREPO.app.directive('plot3d', function(appState, plotting, utilities) { if (! fullDomain) { return; } + if (plotAxis.allowUpdates) { var width = parseInt(select().style('width')) - $scope.margin.left - $scope.margin.right - $scope.pad; if (! heatmap || isNaN(width)){ return; @@ -1307,7 +1309,7 @@ SIREPO.app.directive('plot3d', function(appState, plotting, utilities) { axes.y.scale.range([canvasSize, 0]); axes.bottomY.scale.range([$scope.bottomPanelHeight - $scope.pad - $scope.margin.bottom - 1, 0]); axes.rightX.scale.range([0, $scope.rightPanelWidth - $scope.pad - $scope.margin.right]); - + } if (prevDomain && (exceededMaxZoom(axes.x.scale, 'x') || exceededMaxZoom(axes.y.scale, 'y'))) { restoreDomain(axes.x.scale, prevDomain[0]); restoreDomain(axes.y.scale, prevDomain[1]); @@ -1339,11 +1341,12 @@ SIREPO.app.directive('plot3d', function(appState, plotting, utilities) { height: $scope.canvasSize, }, select, '.right-panel '); + if (plotAxis.allowUpdates) { axes.x.grid.ticks(axes.x.tickCount); axes.y.grid.ticks(axes.y.tickCount); axes.x.grid.tickSize(- $scope.canvasSize - $scope.bottomPanelHeight + $scope.margin.bottom); // tickLine == gridline axes.y.grid.tickSize(- $scope.canvasSize - $scope.rightPanelWidth + $scope.margin.right); // tickLine == gridline - + } resetZoom(); select('.mouse-rect-xy').call(xyZoom); select('.mouse-rect-x').call(axes.x.zoom); @@ -1565,6 +1568,7 @@ SIREPO.app.directive('heatmap', function(appState, plotting, utilities) { } function refresh() { + if (plotAxis.allowUpdates) { var width = parseInt(select().style('width')) - $scope.margin.left - $scope.margin.right; if (! heatmap || isNaN(width)) { return; @@ -1574,6 +1578,7 @@ SIREPO.app.directive('heatmap', function(appState, plotting, utilities) { axes.x.scale.range([0, $scope.canvasSize.width]); axes.y.scale.range([$scope.canvasSize.height, 0]); $scope.margin.right = colorbarSize(); + } if (plotting.trimDomain(axes.x.scale, getRange(axes.x.values)) + plotting.trimDomain(axes.y.scale, getRange(axes.y.values))) { select('.mouse-rect').attr('class', 'mouse-rect mouse-zoom'); @@ -1587,11 +1592,13 @@ SIREPO.app.directive('heatmap', function(appState, plotting, utilities) { $.each(axes, function(dim, axis) { axis.updateLabelAndTicks($scope.canvasSize, select); }); + if (plotAxis.allowUpdates) { colorbar.barlength($scope.canvasSize.height).origin([$scope.canvasSize.width + $scope.margin.right, 0]); // must remove the element to reset the margins select('svg.colorbar').remove(); pointer = select('.colorbar').call(colorbar); } + } function resetZoom() { zoom = axes.x.createZoom($scope).y(axes.y.scale);
7
diff --git a/js/browser.js b/js/browser.js @@ -1435,7 +1435,7 @@ var igv = (function (igv) { const loci = string.split(' ') - const genomicStateList = await createGenomicStateList(loci) + let genomicStateList = await createGenomicStateList(loci) if (genomicStateList.length > 0) { @@ -1448,7 +1448,12 @@ var igv = (function (igv) { gs.id = igv.guid(); } - } else { + } else if (loci.length > 1) { + // If nothing is found and there are spaces, consider the possibility that the search term itself has spaces + genomicStateList = await createGenomicStateList([string]) + } + + if(genomicStateList.length === 0) { throw new Error('Unrecognized locus ' + string); } @@ -1770,6 +1775,11 @@ var igv = (function (igv) { this.eventHandlers[eventName].push(fn); }; + /** + * @deprecated use off() + * @param eventName + * @param fn + */ igv.Browser.prototype.un = function (eventName, fn) { if (!this.eventHandlers[eventName]) { return; @@ -1781,6 +1791,23 @@ var igv = (function (igv) { } }; + igv.Browser.prototype.off = function (eventName, fn) { + + if(!eventName) { + this.eventHandlers = {} // Remove all event handlers + } + else if(!fn) { + this.eventHandlers[eventName] = [] // Remove all eventhandlers matching name + } + else { + // Remove specific event handler + const callbackIndex = this.eventHandlers[eventName].indexOf(fn); + if (callbackIndex !== -1) { + this.eventHandlers[eventName].splice(callbackIndex, 1); + } + } + }; + igv.Browser.prototype.fireEvent = function (eventName, args, thisObj) { var scope, results,
11
diff --git a/src/components/FormEdit.jsx b/src/components/FormEdit.jsx @@ -53,11 +53,11 @@ const FormEdit = (props) => { const formChange = (newForm) => dispatchFormAction({type: 'formChange', value: newForm}); - const {saveText, options, builder} = props; + const {saveText, options, builder,ref} = props; return ( <div> - <div className="row"> + <div className="row" ref={ref}> <div className="col-lg-2 col-md-4 col-sm-4"> <div id="form-group-title" className="form-group"> <label htmlFor="title" className="control-label field-required">Title</label>
0
diff --git a/index.html b/index.html </a> <span class='tb_sep'></span> <a href=# class='tb_btn tb_LN' title='Toggle line numbers'> - <span class="fa-layers"> - <span class="fal fa-align-justify" data-fa-transform="shrink-3 right-2"></span> - <span class="fa-layers-text" data-fa-transform="shrink-10 left-8 up-6" style="font-weight:300">1</span> - <span class="fa-layers-text" data-fa-transform="shrink-10 left-8" style="font-weight:300">2</span> - <span class="fa-layers-text" data-fa-transform="shrink-10 left-8 down-6" style="font-weight:300">3</span> - </span> + <span class="fal fa-list-ol"></span> </a> <span class='tb_sep tc_only'></span> <a href=# class='tb_btn tb_ER tc_only' title='Execute line'>
14
diff --git a/packages/neutrine/src/layout/appside/style.scss b/packages/neutrine/src/layout/appside/style.scss //Import dependencies @import "@siimple/css/scss/variables.scss"; -//Neutrine toolbar style -.neutrine-toolbar { +//Neutrine appside style +.neutrine-appside { display: block; position: fixed; width: calc(260px - 30px); transition: all 0.3s; top: 0px !important; left: 0px; - //Light toolbar + //Light appside &--light { background-color: siimple-default-color("light"); color: siimple-default-color("dark"); } - //Dark toolbar + //Dark appside &--dark { background-color: siimple-default-color("dark"); color: #ffffff; transition: all 0.3s; overflow: hidden; } - //Light toolbar --> change group color + //Light appside --> change group color &--light &-group { color: rgba(siimple-default-color("dark"), 0.6); } - //Dark toolbar --> change group color + //Dark appside --> change group color &--dark &-group { color: rgba(siimple-default-color("white"), 0.6); } font-weight: normal !important; } } - //Light toolbar + //Light appside &--light &-item { color: siimple-default-color("dark","light"); //Item hover margin-top: 10px; margin-bottom: 10px; } - //Light toolbar --> change separator color + //Light appside --> change separator color &--light &-separator { background-color: siimple-default-color("light", "dark"); } - //Dark toolbar --> change separator color + //Dark appside --> change separator color &--dark &-separator { background-color: rgba(#ffffff, 0.3); } transition: all 0.3s; } } - //Light toolbar --> change toggle color + //Light appside --> change toggle color &--light &-toggle { color: rgba(siimple-default-color("dark"), 0.8); background-color: rgba(siimple-default-color("dark"), 0.1); } - //Dark toolbar --> change toggle color + //Dark appside --> change toggle color &--dark &-toggle { color: rgba(siimple-default-color("white"), 0.8); background-color: rgba(siimple-default-color("white"), 0.1); &-wrapper--collapsed &-toggle-icon { transform: rotate(180deg); } - //Collapsed toolbar + //Collapsed appside &-wrapper--collapsed & { width: 40px !important; //margin-left: 0px !important;
10
diff --git a/src/lib/urlHelper.js b/src/lib/urlHelper.js @@ -43,7 +43,7 @@ export function sanitizeIRI(str, { replacement = "" } = {}) { return result; } -export function sanitizeSlug(str, { replacement = '-' }) { +export function sanitizeSlug(str, { replacement = '-' } = {}) { if (!isString(str)) throw "`sanitizeSlug` only accepts strings as input."; if (!isString(replacement)) throw "the `sanitizeSlug` replacement character must be a string.";
11
diff --git a/tests/schemas/upgrade.schema.json b/tests/schemas/upgrade.schema.json }, "minrange": { "type": "integer", - "minimum": 1, + "minimum": 0, "maximum": 5 }, "maxrange": {
11
diff --git a/docs/Air.md b/docs/Air.md @@ -241,7 +241,6 @@ If the PNR contains no active segments it could not be imported into uAPI. Thus ## .getUniversalRecord(params) <a name="getUniversalRecord"></a> -> May require Terminal access enabled in uAPI. See [TerminalService](Terminal.md) This method returns an array of all PNR objects, which are contained in Universal record, holding the PNR provided. If Universal record does not exists RuntimeError.AirRuntimeError "Record locator not found" will be raised.
3
diff --git a/src/components/LoginCodeForm.js b/src/components/LoginCodeForm.js @@ -26,8 +26,9 @@ const InnerForm = ({ }) => ( <form onSubmit={handleSubmit}> <Field - label="Login code" + label="We just sent a login code to that address. Once you get it, please check your inbox." name="login_code" + p="Paste your login code" value={values.loginCode} onChange={handleChange} onBlur={handleBlur}
7
diff --git a/src/e2e/desktop.spec.ts b/src/e2e/desktop.spec.ts @@ -30,6 +30,8 @@ import path from 'path'; import neatCSV from 'neat-csv'; import stripBom from 'strip-bom'; +// Only executed in headed mode +if (Cypress.browser.isHeaded) { describe('Desktop interface', () => { /** * Layout tests @@ -111,18 +113,6 @@ describe('Desktop interface', () => { }); }); - /** - * @param theme {string} The theme to load - */ - function clearAllAndLoadTheme(theme: string = undefined) { - if (theme === undefined) { - theme = 'demo'; - } - cy.contains('Clear all').click(); - cy.get('.dropdown > .btn').click(); - cy.contains(theme).click(); - } - /** * Layertree tests * @@ -133,7 +123,7 @@ describe('Desktop interface', () => { beforeEach(() => { cy.loadPage(false, 'https://localhost:3000/contribs/gmf/apps/desktop.html?lang=en'); }); - it.skip('Check the layertree buttons', () => { + it('Check the layertree buttons', () => { cy.loadPage(false, 'https://localhost:3000/contribs/gmf/apps/desktop.html?lang=en'); cy.get('div.gmf-layertree-node-597 > .gmf-layertree-expand-node').click(); // Layers-exclusive @@ -156,9 +146,11 @@ describe('Desktop interface', () => { cy.get(layer.selector).should('have.class', layer.class); }); }); - it.skip('Check the WMS (not-mixed)', {browser: '!firefox'}, () => { + it('Check the WMS (not-mixed)', {browser: '!firefox'}, () => { // Clean and re-open 'Demo' theme - clearAllAndLoadTheme(); + cy.contains('Clear all').click(); + cy.get('.dropdown > .btn').click(); + cy.get('.gmf-theme-selector > :nth-child(2)').click(); // Check layer on/off cy.get('div.gmf-layertree-node-114') @@ -201,7 +193,10 @@ describe('Desktop interface', () => { it.skip('Check the WMS mixed', () => {}); it('Reordoning the groups', {browser: '!firefox'}, () => { - clearAllAndLoadTheme(); + // Clean and re-open 'Demo' theme + cy.contains('Clear all').click(); + cy.get('.dropdown > .btn').click(); + cy.get('.gmf-theme-selector > :nth-child(2)').click(); // Disable opened by default groups cy.get('div.gmf-layertree-node-68 > .gmf-layertree-expand-node').click(); @@ -226,7 +221,7 @@ describe('Desktop interface', () => { it.skip('Check the WMTS', () => {}); it.skip('Should close the legend with the layer', () => {}); - it.skip('Should resize the tree panel', () => { + it('Should resize the tree panel', () => { cy.get('.gmf-app-data-panel').should('be.visible'); cy.get('.gmf-app-data-panel-toggle-btn').click(); cy.get('.gmf-app-data-panel').should('not.be.visible'); @@ -266,6 +261,9 @@ describe('Desktop interface', () => { }); } + /** + * Query results in a window - tests + */ context('Query window', () => { it('Query any layer', () => { cy.loadPage( @@ -320,7 +318,12 @@ describe('Desktop interface', () => { }; cy.readFile(filename, 'utf-8').then((csv: string) => validateCsv(csv, validationObject)); }); + }); + /** + * Query results in a grid - tests + */ + context('Query grid', () => { it('Result in a grid', () => { cy.loadPage( false, @@ -372,11 +375,17 @@ describe('Desktop interface', () => { // cy.simulateDOMEvent(element, 'pointerdown', 100, 100, true); // cy.simulateDOMEvent(element, 'pointerup', 100, 100, true); // }); + + // Close query grid panel + cy.get('.gmf-displayquerygrid > .close').click(); + cy.get('.gmf-displayquerygrid').should('not.be.visible'); }); }); - context.skip('Query grid', () => {}); - context.skip('Profile', () => { + context('Profile', () => { + beforeEach(() => { + cy.loadPage(false, 'https://localhost:3000/contribs/gmf/apps/desktop.html?lang=en'); + }); it('Checks the profile', () => { cy.get('[ng-model="mainCtrl.drawProfilePanelActive"]').click(); cy.get('canvas').click(100, 200); @@ -396,3 +405,4 @@ describe('Desktop interface', () => { }); describe('Desktop_alt interface', () => {}); +}
8
diff --git a/src/video/webgl/webgl_renderer.js b/src/video/webgl/webgl_renderer.js this.compositor.reset(); this.gl.disable(this.gl.SCISSOR_TEST); this.createFillTexture(this.cache); + if (typeof this.fontContext2D !== "undefined" ) { + this.createFontTexture(this.cache); + } + }, /** * @ignore */ createFontTexture : function (cache) { + if (typeof this.fontTexture === "undefined") { var image = me.video.createCanvas( me.Math.nextPowerOfTwo(this.backBufferCanvas.width), me.Math.nextPowerOfTwo(this.backBufferCanvas.height) image, cache ); + } + else { + // fillTexture was already created, just add it back into the cache + cache.put(this.fontContext2D.canvas, this.fontTexture); + } + this.compositor.uploadTexture(this.fontTexture, 0, 0, 0); + + - this.compositor.uploadTexture(this.fontTexture); }, /** ); // Clear font context2D - fontContext.clearRect(0, 0, this.backBufferCanvas.width, this.backBufferCanvas.height); + fontContext.clearRect( + bounds.pos.x, + bounds.pos.y, + bounds.width, + bounds.height + ); }, /** * @ignore */ getFontContext : function () { - if (typeof (this.fontContext2D) === "undefined" ) { + if (typeof this.fontContext2D === "undefined" ) { // warn the end user about performance impact - console.warn("[WebGL Renderer] WARNING : Using Standard me.Font with WebGL will severly impact performances !"); + console.warn("[WebGL Renderer] WARNING : Using Standard me.Text with WebGL will severly impact performances !"); // create the font texture if not done yet this.createFontTexture(this.cache); }
1
diff --git a/website_code/php/templates/new_template.php b/website_code/php/templates/new_template.php @@ -34,6 +34,10 @@ require_once("../user_library.php"); require_once("../template_library.php"); require_once("../file_library.php"); +if(empty($_SESSION['toolkits_logon_id'])) { + die("Please login"); +} + /* * get the root folder for this user */
1
diff --git a/PostTimelineFilters.user.js b/PostTimelineFilters.user.js // @description Inserts several filter options for post timelines // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 1.17.1 +// @version 1.17.2 // // @include https://*stackoverflow.com/* // @include https://*serverfault.com/* @@ -501,12 +501,6 @@ table.post-timeline .event-type + .wmn1 { min-width: 108px; width: 108px; } -table.post-timeline .event-type + .wmn1 span { - display: block; - width: 87px; - height: 1.1em; - overflow: hidden; -} td.event-type span.event-type { font-size: 12px; }
2
diff --git a/src/lib/download-blob.js b/src/lib/download-blob.js @@ -8,11 +8,23 @@ export default (filename, blob) => { return; } + if ('download' in HTMLAnchorElement.prototype) { const url = window.URL.createObjectURL(blob); downloadLink.href = url; downloadLink.download = filename; downloadLink.type = blob.type; downloadLink.click(); - window.URL.revokeObjectURL(url); document.body.removeChild(downloadLink); + window.URL.revokeObjectURL(url); + } else { + // iOS Safari, open a new page and set href to data-uri + let popup = window.open('', '_blank'); + const reader = new FileReader(); + reader.onloadend = function () { + popup.location.href = reader.result; + popup = null; + }; + reader.readAsDataURL(blob); + } + };
11
diff --git a/assets/src/edit-story/components/panels/pageAttachment/index.js b/assets/src/edit-story/components/panels/pageAttachment/index.js @@ -48,6 +48,7 @@ function PageAttachmentPanel() { const { pageAttachment = {} } = currentPage; const defaultCTA = __('Learn more', 'web-stories'); const { url, ctaText = defaultCTA } = pageAttachment; + const [_ctaText, _setCtaText] = useState(ctaText); const updatePageAttachment = useCallback( (value) => { @@ -71,7 +72,7 @@ function PageAttachmentPanel() { !isValidUrl(withProtocol(url || '')) ); - const isDefault = ctaText === defaultCTA; + const isDefault = _ctaText === defaultCTA; return ( <SimplePanel name="pageAttachment" @@ -101,12 +102,13 @@ function PageAttachmentPanel() { {Boolean(url) && !isInvalidUrl && ( <Row> <ExpandedTextInput - onChange={(value) => + onChange={(value) => _setCtaText(value)} + onBlur={(value) => updatePageAttachment({ ctaText: value ? value : defaultCTA }) } - value={ctaText || defaultCTA} + value={_ctaText} aria-label={__('Edit: Page Attachment CTA text', 'web-stories')} - clear={Boolean(ctaText) && !isDefault} + clear={Boolean(_ctaText) && !isDefault} suffix={isDefault ? __('default', 'web-stories') : null} width={isDefault ? 85 : null} />
7
diff --git a/lib/Common/Memory/Recycler.cpp b/lib/Common/Memory/Recycler.cpp @@ -4788,7 +4788,36 @@ bool Recycler::AbortConcurrent(bool restoreState) { this->ResetMarkCollectionState(); } - //TODO:akatti: Do we need to handle the CollectionStateConcurrentSweepPass1Wait state and finish ConcurrentSweep here?? +#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP + else if (collectionState == CollectionStateConcurrentSweepPass1Wait) + { + // Make sure we don't do another GC after finishing this one. + this->inExhaustiveCollection = false; + + this->FinishSweepPrep(); + this->collectionState = CollectionStateConcurrentSweepPass2; + this->recyclerSweep->FinishSweep(); + this->FinishConcurrentSweep(); + this->recyclerSweep->EndBackground(); + + uint sweptBytes = 0; +#ifdef RECYCLER_STATS + sweptBytes = (uint)collectionStats.objectSweptBytes; +#endif + + GCETW(GC_BACKGROUNDSWEEP_STOP, (this, sweptBytes)); + GCETW_INTERNAL(GC_STOP, (this, ETWEvent_ConcurrentSweep)); + + this->collectionState = CollectionStateTransferSweptWait; + RECYCLER_PROFILE_EXEC_BACKGROUND_END(this, Js::ConcurrentSweepPhase); + + // AbortConcurrent already consumed the event from the concurrent thread, just signal it so + // FinishConcurrentCollect can wait for it again. + SetEvent(this->concurrentWorkDoneEvent); + + EnsureNotCollecting(); + } +#endif else if (collectionState == CollectionStateTransferSweptWait) { // Make sure we don't do another GC after finishing this one.
9
diff --git a/website/package.json b/website/package.json { "dependencies": { - "cookie-parser": "^1.4.3", - "ejs": "^2.5.7", - "express": "^4.16.3", + "cookie-parser": "^1.4.4", + "ejs": "^2.6.1", + "express": "^4.16.4", "fs-extra": "^5.0.0", - "jsonwebtoken": "^8.2.2", - "libxslt": "https://github.com/alexdee2007/node-libxslt", + "jsonwebtoken": "^8.5.0", + "libxslt": "git+https://github.com/alexdee2007/node-libxslt.git", "markdown": "^0.5.0", - "multer": "^1.3.0", - "nodemailer": "^4.6.5", + "multer": "^1.4.1", + "nodemailer": "^4.7.0", "sha1": "^1.1.1", - "sqlite3": "^4.0.4", + "sqlite3": "^4.0.6", "xmldom": "^0.1.27" } }
3
diff --git a/src/matrix/e2ee/RoomEncryption.js b/src/matrix/e2ee/RoomEncryption.js @@ -182,9 +182,7 @@ export class RoomEncryption { log.set("id", sessionId); log.set("senderKey", senderKey); try { - const session = await this._sessionBackup.getSession(this._room.id, sessionId, log); - if (session?.algorithm === MEGOLM_ALGORITHM) { - let roomKey = this._megolmDecryption.roomKeyFromBackup(this._room.id, sessionId, session); + const roomKey = await this._sessionBackup.getRoomKey(this._room.id, sessionId, log); if (roomKey) { if (roomKey.senderKey !== senderKey) { log.set("wrong_sender_key", roomKey.senderKey); @@ -209,9 +207,6 @@ export class RoomEncryption { await log.wrap("retryDecryption", log => this._room.notifyRoomKey(roomKey, retryEventIds || [], log)); } } - } else if (session?.algorithm) { - log.set("unknown algorithm", session.algorithm); - } } catch (err) { if (!(err.name === "HomeServerError" && err.errcode === "M_NOT_FOUND")) { log.set("not_found", true);
5
diff --git a/packages/gatsby-source-filesystem/src/create-remote-file-node.js b/packages/gatsby-source-filesystem/src/create-remote-file-node.js @@ -26,9 +26,14 @@ module.exports = ({ url, store, cache, createNode, auth = {} }) => // See if there's response headers for this url // from a previous request. const cachedHeaders = await cache.get(cacheId(url)) - const headers = { - auth: auth.htaccess_user + `:` + auth.htaccess_pass, + const headers = {} + + // Add htaccess authentication if passed in. This isn't particularly + // extensible. We should define a proper API that we validate. + if (auth && auth.htaccess_pass && auth.htaccess_user) { + headers.auth = `${auth.htaccess_user}:${auth.htaccess_pass}` } + if (cachedHeaders && cachedHeaders.etag) { headers[`If-None-Match`] = cachedHeaders.etag }
7
diff --git a/js/models/searchSamples.js b/js/models/searchSamples.js @@ -47,7 +47,7 @@ var tol = 0.01; var near = _.curry((x, y) => (x === null || y === null) ? y === x : Math.abs(x - y) < tol); var searchFloat = _.curry((dataField, cmp, ctx, search, data) => { - var values = _.getIn(data, [dataField, 'values']), + var values = _.getIn(data, [dataField, 'values'], [[]]), searchVal = search === 'null' ? null : parseFloat(search); if (searchVal === null) { // special case for null: handle sub-columns.
9
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -111,10 +111,10 @@ jobs: client-payload: '{}' - name: 'Trigger Netlify deployment' - uses: jasongitmail/fast-webhook@v1 - with: - url: ${{ secrets.NETLIFY_BOXDEV_WEBHOOK }} - json: '{}' + uses: joelwmale/webhook-action@master + env: + WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_WEBHOOK }} + data: '{}' - name: Send Slack notification uses: Ilshidur/[email protected] @@ -170,10 +170,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: 'Trigger Netlify deployment' - uses: jasongitmail/fast-webhook@v1 - with: - url: ${{ secrets.NETLIFY_BOXDEV_STAGING_WEBHOOK }} - json: '{}' + uses: joelwmale/webhook-action@master + env: + WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_STAGING_WEBHOOK }} + data: '{}' - name: Send Slack notification uses: Ilshidur/[email protected] @@ -203,10 +203,10 @@ jobs: steps: - name: 'Trigger Netlify deployment' - uses: jasongitmail/fast-webhook@v1 - with: - url: ${{ secrets.NETLIFY_BOXDEV_JP_WEBHOOK }} - json: '{}' + uses: joelwmale/webhook-action@master + env: + WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_JP_WEBHOOK }} + data: '{}' - name: Send Slack notification uses: Ilshidur/[email protected]
14
diff --git a/examples/peer/test/Peer.js b/examples/peer/test/Peer.js @@ -54,7 +54,6 @@ contract('Peer', async accounts => { alicePeer = await Peer.new(swapAddress, aliceAddress, { from: aliceAddress, }) - await alicePeer.setSwapContract(swapAddress) }) })
2
diff --git a/site/upgrade.md b/site/upgrade.md @@ -673,7 +673,7 @@ on how to upgrade RabbitMQ. topology that are relevant. This data will help verify that the system operates within reasonable parameters after the upgrade. - Use [node health checks](https://rabbitmq.com/monitoring.html#health-checks) to + Use [node health checks](monitoring.html#health-checks) to vet individual nodes. Queues in flow state or blocked/blocking connections might be ok,
4
diff --git a/packages/frontend/src/utils/wallet.js b/packages/frontend/src/utils/wallet.js @@ -1042,6 +1042,7 @@ class Wallet { } else { const lastAccount = accountIdsError.reverse().find((account) => account.error.type === 'LackBalanceForState'); if (lastAccount) { + this.accountId = localStorage.getItem(KEY_ACTIVE_ACCOUNT_ID) || ''; store.dispatch(redirectTo(`/profile/${lastAccount.accountId}`, { globalAlertPreventClear: true })); throw lastAccount.error; } else {
12
diff --git a/src/lib/login/checkAuthStatus.js b/src/lib/login/checkAuthStatus.js @@ -5,19 +5,21 @@ import goodWalletLogin from '../login/GoodWalletLogin' import logger from '../logger/pino-logger' import API from '../API/api' import GDStore from '../undux/GDStore' - +import userStorage from '../gundb/UserStorage' const log = logger.child({ from: 'AppSwitch' }) export const checkAuthStatus = async (store: GDStore) => { // when wallet is ready perform login to server (sign message with wallet and send to server) const [credsOrError, isCitizen]: any = await Promise.all([goodWalletLogin.auth(), goodWallet.isCitizen()]) - const isLoggedIn = credsOrError.jwt !== undefined + const isLoggedIn = credsOrError.jwt !== undefined && (await userStorage.getProfileField('registered')) const isLoggedInCitizen = isLoggedIn && isCitizen + store.set('isLoggedIn')(isLoggedIn) store.set('isLoggedInCitizen')(isLoggedInCitizen) return { credsOrError, - isLoggedInCitizen + isLoggedInCitizen, + isLoggedIn } }
0
diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js @@ -12,7 +12,6 @@ class Notifs extends Component { notifTimestamp: 1, active: false, firstFetch: true, - sort: false, }; } componentDidMount() { @@ -23,11 +22,6 @@ class Notifs extends Component { */ const { fetchNotifs } = this.props; - if (localStorage.getItem('notifsort') === null) { localStorage.setItem('notifsort', false); } - - // eslint-disable-next-line - this.setState({ sort: localStorage.getItem('notifsort') }); - fetchNotifs(); setInterval(() => { @@ -67,10 +61,6 @@ class Notifs extends Component { this.setState({ active: !this.state.active }); } } - toggleSort() { - this.setState({ sort: !this.state.sort }); - localStorage.setItem('notifsort', this.state.sort); - } render() { const { notifs, auth, open, clearNotifs } = this.props; @@ -108,11 +98,7 @@ class Notifs extends Component { className="notifs_clear" onClick={() => { clearNotifs(); }} >Clear All</button> - <button - className="notifs_clear notifs_sort" - onClick={() => { this.toggleSort(); }} - >{this.state.sort ? 'Sort by Time' : 'Sort by Quality'}</button> - <NotifBubbles data={notifs} open={open} sort={this.state.sort} /> + <NotifBubbles data={notifs} open={open} /> </div> <div className={`notifs_bubbles_container ${this.state.active ? 'active' : ''}`} /> </div>
13
diff --git a/src/components/editgrid/EditGrid.js b/src/components/editgrid/EditGrid.js @@ -894,7 +894,7 @@ export default class EditGridComponent extends NestedArrayComponent { } } // If this is a dirty check, and any rows are still editing, we need to throw validation error. - rowsEditing |= (dirty && this.isOpen(editRow)); + rowsEditing |= this.isRowEditing(dirty, editRow); }); if (!rowsValid) { @@ -911,6 +911,10 @@ export default class EditGridComponent extends NestedArrayComponent { return true; } + isRowEditing(dirty, editRow) { + return dirty && this.isOpen(editRow); + } + setValue(value, flags = {}) { if (!value) { value = this.defaultValue;
5
diff --git a/src/session_pool/session.js b/src/session_pool/session.js @@ -182,7 +182,7 @@ export class Session { /** * Retires session based on status code. * @param statusCode {Number} - HTTP status code - * @return {boolean} - whether the session was retired + * @return {boolean} whether the session was retired. */ checkStatus(statusCode) { const isBlocked = STATUS_CODES_BLOCKED.includes(statusCode); @@ -194,7 +194,7 @@ export class Session { /** * Sets cookies from response to the cookieJar. - * Parses cookies from "set-cookie" header and sets them to "Session.cookieJar". + * Parses cookies from `set-cookie` header and sets them to `Session.cookieJar`. * @param response */ setCookiesToJar(response) { @@ -206,9 +206,9 @@ export class Session { } /** - * Wrapper around "tough" cookie jar `getCookieString` method. + * Wrapper around `tough-cookie` Cookie jar `getCookieString` method. * @param url - * @return {String}; + * @return {String} String representing `Cookie` header. */ getCookieString(url) { console.log(this.cookieJar);
7
diff --git a/src/modules/default/index.js b/src/modules/default/index.js @@ -82,16 +82,20 @@ export function setup(api) { log('exec => mup setup'); const config = api.getConfig(); - return docker.setup(api).then(() => { + return docker + .setup(api) + .then(meteor.setup.bind(null, api)) + .then(() => { if (config.mongo) { - return Promise.all([ - meteor.setup(api), - mongo.setup(api) - ]).then(() => mongo.start(api)) - .then(displayNextSteps); + return mongo.setup(api); + } + }) + .then(() => { + if (config.mongo) { + return mongo.start(api); } - return meteor.setup(api).then(displayNextSteps); - }); + }) + .then(displayNextSteps); } export function start(api) {
12
diff --git a/templates/master/default-settings.js b/templates/master/default-settings.js @@ -19,7 +19,7 @@ var default_settings = { ERRORMESSAGE: "Unfortunately I encountered an error when searching for your answer. Please ask me again later.", EMPTYMESSAGE: "You stumped me! Sadly I don't know how to answer your question.", DEFAULT_ALEXA_LAUNCH_MESSAGE: "Hello, Please ask a question", - DEFAULT_ALEXA_REPROMPT: "Say Goodbye to disconnect, otherwise ask another question.", + DEFAULT_ALEXA_REPROMPT: "Please either answer the question, ask another question or say Goodbye to end the conversation.", DEFAULT_ALEXA_STOP_MESSAGE: "Goodbye", SMS_HINT_REMINDER_ENABLE: "true", SMS_HINT_REMINDER: " (Feedback? Reply THUMBS UP or THUMBS DOWN. Ask HELP ME at any time)",
3
diff --git a/articles/quickstart/native/android/03-session-handling.md b/articles/quickstart/native/android/03-session-handling.md @@ -199,7 +199,7 @@ private void logout() { Depending on the way you store users' credentials, you delete them differently. ::: -### Optional: Encapsulate Session Handling +## Optional: Encapsulate Session Handling Handling users' sessions is not a straightforward process. You can simplify it by storing token-related information and processes in a class. The class separates the logic for handling users' sessions from the activity.
3
diff --git a/app/builtin-pages/views/workspaces.js b/app/builtin-pages/views/workspaces.js @@ -84,15 +84,15 @@ function renderTabs () { return yo` <div class="tabs"> <div onclick=${e => onChangeTab('revisions')} class="tab ${activeTab === 'revisions' ? 'active' : ''}"> - <span class="icon revisions">${'</>'}</i> + <i class="fa fa-code"></i> Revisions </div> <div onclick=${e => onChangeTab('wizards')} class="tab ${activeTab === 'wizards' ? 'active' : ''}"> - <i></i> + <i class="fa fa-cube"></i> Wizards </div> <div onclick=${e => onChangeTab('settings')} class="tab ${activeTab === 'settings' ? 'active' : ''}"> - ${renderGearIcon()} + <i class="fa fa-cogs"></i> Settings </div> </div> @@ -102,8 +102,11 @@ function renderTabs () { function renderActions () { return yo` <div class="actions"> - <button onclick=${onRevertChanges} class="btn">Revert changes</button> - <button onclick=${onPublishChanges} class="btn success">Publish changes</button> + <button onclick=${onRevertChanges} class="btn"> + Revert + <i class="fa fa-undo"></i> + </button> + <button onclick=${onPublishChanges} class="btn success">Publish</button> </div> ` }
4
diff --git a/bids-validator/tests/env/ExamplesEnvironmentWeb.js b/bids-validator/tests/env/ExamplesEnvironmentWeb.js @@ -3,7 +3,7 @@ const JsdomEnvironment = require('jest-environment-jsdom-global') const loadExamples = require('./load-examples.js') // Environment which includes the bids-examples datasets -class ExamplesEnvironment extends JsdomEnvironment { +class ExamplesEnvironmentWeb extends JsdomEnvironment { async setup() { await super.setup() this.global.test_version = loadExamples() @@ -18,4 +18,4 @@ class ExamplesEnvironment extends JsdomEnvironment { } } -module.exports = ExamplesEnvironment +module.exports = ExamplesEnvironmentWeb
4
diff --git a/package.json b/package.json "@babel/preset-env": "^7.12.1", "babel-loader": "^8.1.0", "copy-webpack-plugin": "^6.3.0", + "eslint": "7.11.0", "eslint-config-prettier": "6.12.0", "eslint-plugin-import": "2.22.1", - "eslint": "7.11.0", "globby": "^11.0.1", "prettier": "2.1.2", + "webpack": "4.44.2", "webpack-cli": "3.3.12", - "webpack-virtual-modules": "^0.3.2", - "webpack": "4.44.2" + "webpack-virtual-modules": "^0.3.2" }, "dependencies": { "@skpm/fs": "0.2.6",
14
diff --git a/build/build.py b/build/build.py @@ -50,6 +50,8 @@ import compiler import shakaBuildHelpers +shaka_version = shakaBuildHelpers.calculate_version() + common_closure_opts = [ '--language_out', 'ECMASCRIPT3', @@ -74,6 +76,7 @@ common_closure_defines = [ '-D', 'goog.STRICT_MODE_COMPATIBLE=true', '-D', 'goog.ENABLE_DEBUG_LOADER=false', ] + debug_closure_opts = [ # Don't use a wrapper script in debug mode so all the internals are visible # on the global object. @@ -83,6 +86,7 @@ debug_closure_defines = [ '-D', 'goog.DEBUG=true', '-D', 'goog.asserts.ENABLE_ASSERTS=true', '-D', 'shaka.log.MAX_LOG_LEVEL=4', # shaka.log.Level.DEBUG + '-D', 'shaka.Player.version="%s-debug"' % shaka_version, ] release_closure_opts = [ @@ -92,6 +96,7 @@ release_closure_defines = [ '-D', 'goog.DEBUG=false', '-D', 'goog.asserts.ENABLE_ASSERTS=false', '-D', 'shaka.log.MAX_LOG_LEVEL=0', + '-D', 'shaka.Player.version="%s"' % shaka_version, ]
1
diff --git a/src/utils/query-config.js b/src/utils/query-config.js @@ -28,7 +28,7 @@ const markdownQueryConfig = [ { section: `concepts`, indexName: `concept`, - niceName: `Core Concepts`, + niceName: `Concepts`, }, { section: `setup`,
10
diff --git a/app/authenticated/prefs/template.hbs b/app/authenticated/prefs/template.hbs {{settings/theme-toggle}} <hr class="mt-20 mb-20" /> {{settings/table-rows}} - <hr class="mt-20 mb-20" /> - {{settings/landing-page}} </div> <div class="col offset-1-of-23 span-11-of-23 mt-0 mb-0"> <h2>
2
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.52.0", + "version": "0.53.0", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: tar xf mongodb-linux-x86_64-${{ matrix.mongo-os }}-${{ matrix.mongo }}.tgz mkdir -p ./data/db/27017 ./data/db/27000 printf "\n--timeout 8000" >> ./test/mocha.opts - ./mongodb-linux-x86_64-${{ matrix.mongo-os }}-${{ matrix.mongo }}/bin/mongod --fork --dbpath ./data/db/27017 --syslog --port 27017 + ./mongodb-linux-x86_64-${{ matrix.mongo-os }}-${{ matrix.mongo }}/bin/mongod --setParameter ttlMonitorSleepSecs=1 --fork --dbpath ./data/db/27017 --syslog --port 27017 sleep 2 mongod --version echo `pwd`/mongodb-linux-x86_64-${{ matrix.mongo-os }}-${{ matrix.mongo }}/bin >> $GITHUB_PATH
12
diff --git a/lib/assets/core/javascripts/cartodb3/components/form-components/editors/select/select-list-view.js b/lib/assets/core/javascripts/cartodb3/components/form-components/editors/select/select-list-view.js @@ -111,7 +111,7 @@ module.exports = CoreView.extend({ this._dropdownOverlay = new DropdownOverlayView({ container: closestModalDialog.length ? closestModalDialog : undefined, onClickAction: this.hide.bind(this), - visible: this.isVisible() + visible: true }); this.addView(this._dropdownOverlay);
12
diff --git a/examples/website/trips/README.md b/examples/website/trips/README.md -This is a minimal standalone version of the TripsLayer example +This is a minimal standalone version of the [TripsLayer example](https://deck.gl/#/examples/custom-layers/trip-routes) on [deck.gl](http://deck.gl) website. ### Usage @@ -10,4 +10,4 @@ npm start ### Data format Sample data is stored in [deck.gl Example Data](https://github.com/uber-common/deck.gl-data/tree/master/examples/trips). To use your own data, checkout -the [documentation of TripsLayer](./trips-layer/README.md). +the [documentation of TripsLayer](https://github.com/uber/deck.gl/tree/master/modules/experimental-layers/src/trips-layer).
1
diff --git a/articles/connections/enterprise/azure-active-directory/v2/index.md b/articles/connections/enterprise/azure-active-directory/v2/index.md @@ -125,7 +125,7 @@ Create and configure an Azure AD Enterprise Connection in Auth0. Make sure you h | **Identity API** | API used by Auth0 to interact with Azure AD endpoints. Learn about the differences in behavior in Microsoft's [Why update to Microsoft identity platform (v2.0)](https://docs.microsoft.com/en-us/azure/active-directory/develop/azure-ad-endpoint-comparison) doc. | | **Attributes** | Basic attributes for the signed-in user that your app can access. Indicates how much information you want stored in the Auth0 User Profile. | | **Extended Attributes** (optional) | Extended attributes for the signed-in user that your app can access. | -| **Auth0 APIs** (optional) | When selected, indicates that we require the ability to make calls to the Azure AD API, which allows us to search for users in the Azure AD Graph even if they never logged in to Auth0. This is required in some cases, since no feature parity exists between the Azure AD API v1 and Microsoft Identity Plaform v2, but it will be eliminated when the Auth0 Management API v1 is shut down after July 6, 2020. | +| **Auth0 APIs** (optional) | When selected, indicates that we require the ability to make calls to the Azure AD API, which allows us to search for users in the Azure AD Graph even if they never logged in to Auth0. | | **Sync user profile attributes at each login** | When enabled, Auth0 automatically syncs user profile data with each user login, thereby ensuring that changes made in the connection source are automatically updated in Auth0. | | **Email Verification** | Choose how Auth0 sets the `email_verified` field in the user profile. To learn more, see [Email Verification for Azure AD and ADFS](/connections/azuread-adfs-email-verification). |
2
diff --git a/src/containers/FlightDirector/SimulatorConfig/index.js b/src/containers/FlightDirector/SimulatorConfig/index.js @@ -311,7 +311,9 @@ class ConfigComponentData extends React.PureComponent { <ConfigComponent Comp={Comp} subscribe={subscribeToMore} - selectedSimulator={data.simulators[0]} + selectedSimulator={data.simulators.find( + s => s.id === simulatorId + )} /> ) : null }
7
diff --git a/src/lib/core.d.ts b/src/lib/core.d.ts @@ -545,7 +545,7 @@ export default class SunEditor { core: Core; util: Util; - onload: EventFn; + onload: (core: Core, reload: boolean) => void; onScroll: EventFn; onMouseDown: EventFn; onClick: EventFn;
1
diff --git a/commands/mute.js b/commands/mute.js @@ -52,7 +52,7 @@ command.execute = async (message, args, database, bot) => { //highest role check if(member && (message.member.roles.highest.comparePositionTo(message.guild.members.resolve(userId).roles.highest) <= 0 || await util.isMod(member))) { await message.react(util.icons.error); - await message.channel.send("You don't have the permission to mute that member!"); + await message.channel.send(`You don't have the permission to mute <@${member.id}>!`); continue; }
7
diff --git a/src/og/cons.js b/src/og/cons.js @@ -64,7 +64,7 @@ export class Cons { d.classList.add("ogConsole-text"); d.classList.add("ogConsole-error"); d.innerHTML = "error: " + str; - console.log(d.innerHTML); + console.trace(d.innerHTML); this._container.appendChild(d); this.show(); } @@ -79,7 +79,7 @@ export class Cons { d.classList.add("ogConsole-text"); d.classList.add("ogConsole-warning"); d.innerHTML = "warning: " + str; - console.log(d.innerHTML); + console.trace(d.innerHTML); this._container.appendChild(d); this.show(); } @@ -99,7 +99,7 @@ export class Cons { } } d.innerHTML = str; - console.log(str); + console.trace(str); this._container.appendChild(d); this.show(); }
0
diff --git a/packages/swagger2openapi/common.js b/packages/swagger2openapi/common.js @@ -73,7 +73,7 @@ function readFileAsync(filename, encoding) { function resolveExternal(root, pointer, options, callback) { var u = url.parse(options.source); - var base = options.source.split('/'); + var base = options.source.split('\\').join('/').split('/'); base.pop(); // drop the actual filename let fragment = ''; let fnComponents = pointer.split('#');
11
diff --git a/assets/js/modules/tagmanager/setup.js b/assets/js/modules/tagmanager/setup.js @@ -211,10 +211,9 @@ class TagmanagerSetup extends Component { try { const { selectedAccount, - usageContext, } = this.state; - const accounts = await data.get( TYPE_MODULES, 'tagmanager', 'accounts', { usageContext } ); + const accounts = await data.get( TYPE_MODULES, 'tagmanager', 'accounts' ); this.validateAccounts( accounts, selectedAccount );
2
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -823,6 +823,12 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ rT.duration = durationReq; return rT; } + + // if insulinReq is negative, snoozeBG > target_bg, and lastCOBpredBG > target_bg, set a neutral temp + if (insulinReq < 0 && snoozeBG > target_bg && lastCOBpredBG > target_bg) { + rT.reason += "; SMB bolus snooze: setting current basal of " + basal + " as temp. "; + return tempBasalFunctions.setTempBasal(basal, 30, profile, rT, currenttemp); + } } var maxSafeBasal = tempBasalFunctions.getMaxSafeBasal(profile);
12
diff --git a/src/content/developers/docs/apis/javascript/index.md b/src/content/developers/docs/apis/javascript/index.md @@ -268,6 +268,11 @@ ethers.utils.formatEther(balance) - [Documentation](https://docs.alchemyapi.io/documentation/alchemy-web3) - [GitHub](https://github.com/alchemyplatform/alchemy-web3) +**Alchemy NFT API -** **_API for fetching NFT data, including ownership, metadata attributes and more._** + +- [Documentation](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api) +- [GitHub](https://github.com/alchemyplatform/alchemy-web3) + ## Further reading {#further-reading} _Know of a community resource that helped you? Edit this page and add it!_
5
diff --git a/docs/setup/README.md b/docs/setup/README.md @@ -97,11 +97,11 @@ services: restart: always ports: # Public HTTP Port: - - '8080:80' + - '80:80' # Public HTTPS Port: - - '4443:443' + - '443:443' # Admin Web Port: - - '8181:81' + - '81:81' environment: # These are the settings to access your db DB_MYSQL_HOST: "db"
12
diff --git a/etc/encoded-apache.conf b/etc/encoded-apache.conf @@ -201,7 +201,6 @@ RewriteRule ^/ENCODE/otherTerms$ /help/getting-started/? [last,redirect=pe RewriteRule ^/ENCODE/integrativeAnalysis/VM$ http://encodedcc.stanford.edu/ftp/encodevm/? [last,redirect=permanent] RewriteRule ^/ENCODE/dataStandards$ /data-standards/? [last,redirect=permanent] RewriteCond %{REQUEST_METHOD} =GET -RewriteRule ^/files/$ /search/?type=file [last,redirect=permanent] RewriteRule ^/encyclopedia/visualize http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&hgt.customText=http://bib.umassmed.edu/~iyers/encode_elements/display/tracks.txt [last,redirect=permanent] # Fallback
2
diff --git a/articles/api/authentication/_login.md b/articles/api/authentication/_login.md @@ -404,8 +404,10 @@ Use this endpoint for API-based (active) authentication. Given the user credenti | `username` <br/><span class="label label-danger">Required</span> | Username/email of the user to login | | `password` <br/><span class="label label-danger">Required</span> | Password of the user to login | | `connection` <br/><span class="label label-danger">Required</span> | The name of the connection to use for login | -| `grant_type` <br/><span class="label label-danger">Required</span> | Set to `password` +| `grant_type` <br/><span class="label label-danger">Required</span> | Set to `password` or `urn:ietf:params:oauth:grant-type:jwt-bearer` | | `scope` | Set to `openid` to retrieve also an `id_token`, leave null to get only an `access_token` | +| `device` | You should set this to a string, if you set `grant_type` to `urn:ietf:params:oauth:grant-type:jwt-bearer` | +| `id_token` | Used to authenticate using a token instead of username/password, in [TouchID](/libraries/lock-ios/touchid-authentication) scenarios. | ### Test this endpoint
0
diff --git a/web/app/stores/MarketsStore.js b/web/app/stores/MarketsStore.js @@ -993,8 +993,9 @@ class MarketsStore { asset_id: invert ? last.key.base : last.key.quote } } : null; - - if (!volumeBase) { + volumeBase = utils.get_asset_amount(volumeBase, baseAsset); + volumeQuote = utils.get_asset_amount(volumeQuote, quoteAsset); + if (!Math.floor(volumeBase * 100)) { this.lowVolumeMarkets = this.lowVolumeMarkets.set(market, true); } else { this.lowVolumeMarkets = this.lowVolumeMarkets.delete(market); @@ -1003,8 +1004,8 @@ class MarketsStore { return { change: change.toFixed(2), - volumeBase: utils.get_asset_amount(volumeBase, baseAsset), - volumeQuote: utils.get_asset_amount(volumeQuote, quoteAsset), + volumeBase, + volumeQuote, close: close, latestPrice };
7
diff --git a/app/views/main.scala.html b/app/views/main.scala.html <script src='@routes.Assets.at("javascripts/lib/leaflet-omnivore.min.js")'></script> <script src='@routes.Assets.at("javascripts/lib/js.cookie.js")'></script> <script type="text/javascript" - src="https://maps.googleapis.com/maps/api/js?v=quarterly&key=AIzaSyB0ToxwyHzvubTo9gm0zbtECWuEe3yYo8M&libraries=geometry"> + src="https://maps.googleapis.com/maps/api/js?v=quarterly&key=AIzaSyB340rRhzcPaLHTqYbnz5T73abRQOv01FM&libraries=geometry"> </script> <link href='@routes.Assets.at("stylesheets/fonts.css")' rel="stylesheet"/> <link href='@routes.Assets.at("stylesheets/mapbox.css")' rel='stylesheet' />
14
diff --git a/README.md b/README.md @@ -1083,9 +1083,8 @@ predicate][type-predicates], then this will be reflected in the return type, too <i>Decoder&lt;T&gt;</i> [&lt;&gt;](https://github.com/nvie/decoders/blob/main/src/core/describe.js 'Source')<br /> -Defers to the given decoder, but when a decoding error happens, replace the error message -with the given one. This can be used to simplify or shorten otherwise long or -low-level/technical errors. +Uses the given decoder, but will use an alternative error message in case it rejects. This +can be used to simplify or shorten otherwise long or low-level/technical errors. ```javascript const vowel = describe(
7
diff --git a/src/handler-runner/createHandler.js b/src/handler-runner/createHandler.js @@ -26,7 +26,7 @@ module.exports = function createHandler(funOptions, options) { keys(require.cache).forEach((key) => { // Require cache invalidation, brutal and fragile. // Might cause errors, if so please submit an issue. - if (!key.match(regExp || /node_modules/)) { + if (!key.match(regExp)) { delete require.cache[key] } })
2
diff --git a/PostHeadersQuestionToc.user.js b/PostHeadersQuestionToc.user.js // @description Sticky post headers while you view each post (helps for long posts). Question ToC of Answers in sidebar. // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 2.8.3 +// @version 2.8.4 // // @include https://*stackoverflow.com/questions/* // @include https://*serverfault.com/questions/* const stickyheader = $(`<div class="post-stickyheader"> ${isElectionPage ? 'Nomination' : isQuestion ? 'Question' : 'Answer'} by ${postuserHtml}${postismod ? modflair : ''} ${postdate} <div class="sticky-tools"> - <a href="${routePrefix}/q/${pid}">permalink</a> | <a href="${routePrefix}/posts/${pid}/revisions">revs</a> | <a href="${routePrefix}/posts/${pid}/timeline?filter=WithVoteSummaries">timeline</a> + <a href="${routePrefix}/${isQuestion ? 'q' : 'a'}/${pid}">permalink</a> | <a href="${routePrefix}/posts/${pid}/revisions">revs</a> | <a href="${routePrefix}/posts/${pid}/timeline?filter=WithVoteSummaries">timeline</a> </div></div>`); post.prepend(stickyheader); });
4
diff --git a/Canvas.js b/Canvas.js @@ -188,42 +188,63 @@ function newCanvas () { function onKeyDown (event) { if (event.altKey === true && event.code === 'ArrowUp') { thisObject.cockpitSpace.toTop() + return } if (event.altKey === true && event.code === 'ArrowDown') { thisObject.cockpitSpace.toBottom() + return } if (event.shiftKey === true && event.code === 'ArrowLeft') { canvas.chartSpace.oneScreenLeft() + return } if (event.shiftKey === true && event.code === 'ArrowRight') { canvas.chartSpace.oneScreenRight() + return } if (event.shiftKey === true && event.code === 'ArrowUp') { canvas.chartSpace.oneScreenUp() + return } if (event.shiftKey === true && event.code === 'ArrowDown') { canvas.chartSpace.oneScreenDown() + return } if (event.ctrlKey === true && event.code === 'ArrowLeft') { canvas.floatingSpace.oneScreenLeft() + return } if (event.ctrlKey === true && event.code === 'ArrowRight') { canvas.floatingSpace.oneScreenRight() + return } if (event.ctrlKey === true && event.code === 'ArrowUp') { canvas.floatingSpace.oneScreenUp() + return } if (event.ctrlKey === true && event.code === 'ArrowDown') { canvas.floatingSpace.oneScreenDown() + return + } + + if (event.ctrlKey === true) { + if (event.keyCode > 52 && event.keyCode < 100) { + let nodeOnFocus = canvas.strategySpace.workspace.getNodeThatIsOnFocus() + if (nodeOnFocus !== undefined) { + nodeOnFocus.payload.uiObject.shortcutKey = event.code + nodeOnFocus.payload.uiObject.setValue('Shortcut Key: Ctrl + ' + event.code) + } + } + return } }
12
diff --git a/tests/test_ExternStateFeeToken.py b/tests/test_ExternStateFeeToken.py @@ -37,7 +37,7 @@ class TestExternStateFeeToken(unittest.TestCase): remappings=['""=contracts']) cls.feetoken_abi = cls.compiled['ExternStateFeeToken']['abi'] cls.feetoken_event_dict = generate_topic_event_map(cls.feetoken_abi) - cls.feetoken_real, cls.construction_txr = attempt_deploy( + cls.feetoken, cls.construction_txr = attempt_deploy( cls.compiled, "ExternStateFeeToken", MASTER, ["Test Fee Token", "FEE", UNIT // 20, cls.fee_authority, ZERO_ADDRESS, cls.token_owner] @@ -48,11 +48,9 @@ class TestExternStateFeeToken(unittest.TestCase): [cls.token_owner, cls.token_owner] ) mine_tx(cls.feestate.functions.setBalanceOf(cls.initial_beneficiary, 1000 * UNIT).transact({'from': cls.token_owner})) - mine_tx(cls.feestate.functions.setAssociatedContract(cls.feetoken_real.address).transact({'from': cls.token_owner})) + mine_tx(cls.feestate.functions.setAssociatedContract(cls.feetoken.address).transact({'from': cls.token_owner})) - cls.feetoken = cls.feetoken_real - - mine_tx(cls.feetoken_real.functions.setState(cls.feestate.address).transact({'from': cls.token_owner})) + mine_tx(cls.feetoken.functions.setState(cls.feestate.address).transact({'from': cls.token_owner})) cls.owner = lambda self: cls.feetoken.functions.owner().call() cls.totalSupply = lambda self: cls.feetoken.functions.totalSupply().call() @@ -88,12 +86,10 @@ class TestExternStateFeeToken(unittest.TestCase): cls.feetoken.functions.transferFrom(fromAccount, to, value).transact({'from': sender})) cls.withdrawFee = lambda self, sender, account, value: mine_tx( - cls.feetoken_real.functions.withdrawFee(account, value).transact({'from': sender})) + cls.feetoken.functions.withdrawFee(account, value).transact({'from': sender})) cls.donateToFeePool = lambda self, sender, value: mine_tx( cls.feetoken.functions.donateToFeePool(value).transact({'from': sender})) - cls.debug_messageSender = lambda self: cls.feetoken_real.functions._messageSender().call() - def test_constructor(self): self.assertEqual(self.name(), "Test Fee Token") self.assertEqual(self.symbol(), "FEE") @@ -101,7 +97,7 @@ class TestExternStateFeeToken(unittest.TestCase): self.assertEqual(self.transferFeeRate(), UNIT // 20) self.assertEqual(self.feeAuthority(), self.fee_authority) self.assertEqual(self.state(), self.feestate.address) - self.assertEqual(self.feestate.functions.associatedContract().call(), self.feetoken_real.address) + self.assertEqual(self.feestate.functions.associatedContract().call(), self.feetoken.address) def test_provide_state(self): feestate, _ = attempt_deploy(self.compiled, 'TokenState',
2
diff --git a/examples/customize-footer/CustomFooter.js b/examples/customize-footer/CustomFooter.js @@ -4,17 +4,7 @@ import TableRow from "@material-ui/core/TableRow"; import TableCell from "@material-ui/core/TableCell"; import { withStyles } from "@material-ui/core/styles"; -const defaultToolbarSelectStyles = { - iconButton: { - marginRight: "24px", - top: "50%", - display: "inline-block", - position: "relative", - transform: "translateY(-50%)", - }, - deleteIcon: { - color: "#000", - }, +const defaultFooterStyles = { }; class CustomFooter extends React.Component { @@ -35,4 +25,4 @@ class CustomFooter extends React.Component { } -export default withStyles(defaultToolbarSelectStyles, { name: "CustomFooter" })(CustomFooter); +export default withStyles(defaultFooterStyles, { name: "CustomFooter" })(CustomFooter);
3
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -108,8 +108,9 @@ workflows: requires: - backend-tests - frontend-tests - nightly: + jobs: + - security-checks triggers: - schedule: cron: "0 0 * * *" @@ -117,6 +118,3 @@ workflows: branches: only: - master \ No newline at end of file - jobs: - - security-checks -
0
diff --git a/layouts/partials/head.html b/layouts/partials/head.html {{- with .favicon_svg }} <link rel="icon" type="image/svg+xml" href="{{ . | relLangURL }}"> {{- end -}} + + {{ if and (not .favicon) (not .favicon_png) (not .favicon_svg) }} + <link rel="icon" type="image/svg+xml" href="favicon.svg"> + {{ end }} {{- end }} {{- partial "custom/css.html" . }}
0
diff --git a/docs/documentation/Configuration/Project-Options.md b/docs/documentation/Configuration/Project-Options.md @@ -7,7 +7,7 @@ The following options control the branding, navigation and default export settin The name of the KeystoneJS application -<h4 data-primitive-type="String"><code>name</code></h4> +<h4 data-primitive-type="String"><code>brand</code></h4> Displayed in the top left hand corner of the Admin UI
1
diff --git a/app/pages/project/project-navbar.jsx b/app/pages/project/project-navbar.jsx @@ -36,8 +36,9 @@ function HomeTab({ project, projectPath, translation, onClick, children }) { } function AboutTab({ project, projectPath, onClick}) { - if (!project.redirect) { return ( + project.redirect ? + null : <Link to={`${projectPath}/about`} activeClassName="active" @@ -47,7 +48,6 @@ function AboutTab({ project, projectPath, onClick}) { <Translate content="project.nav.about" /> </Link> ); - } }; function ClassifyLink({ projectPath, workflow, onClick }) {
1
diff --git a/appjs/working.js b/appjs/working.js @@ -23,6 +23,7 @@ $("#clock").click(function(){ closenav(); clearall(); }); + $("#wag").click(function () { openit("#wags"); closenav(); @@ -33,6 +34,7 @@ $("#midrangebtn").click(function () { closenav(); clearall(); }); + $("#utc").click(function(){ openit("#utcs"); closenav(); @@ -74,11 +76,6 @@ $(document).ready(function () { closenav(); clearall(); }); - $("#midrangebtn").click(function () { - openit("#midrange"); - closenav(); - clearall(); - }); $("#sensibtn").click(function () { openit("#sensi"); closenav(); @@ -116,6 +113,12 @@ $(document).ready(function () { clearall(); }); + $("#midrangebtn").click(function () { + openit("#midrange"); + closenav(); + clearall(); + }); + $("#ainv").click(function () { openit("#ais"); closenav();
1
diff --git a/src/controllers/contacts.ts b/src/controllers/contacts.ts @@ -10,7 +10,7 @@ import constants from '../constants' import * as tribes from '../utils/tribes' import * as network from '../network' import { isProxy, generateNewExternalUser } from '../utils/proxy' -import { logging } from '../utils/logger' +import { logging, sphinxLogger } from '../utils/logger' import * as moment from 'moment' export const getContacts = async (req, res) => { @@ -165,11 +165,14 @@ export async function generateOwnerWithExternalSigner(req, res) { } export const generateToken = async (req, res) => { - console.log('=> generateToken called', { + sphinxLogger.info([ + '=> generateToken called', + { body: req.body, params: req.params, query: req.query, - }) + }, + ]) const where: { [k: string]: any } = { isOwner: true } @@ -191,7 +194,7 @@ export const generateToken = async (req, res) => { failure(res, 'Wrong Password') return } else { - console.log('PASSWORD ACCEPTED!') + sphinxLogger.info('PASSWORD ACCEPTED!') } } @@ -219,13 +222,17 @@ export const generateToken = async (req, res) => { export const updateContact = async (req, res) => { if (!req.owner) return failure(res, 'no owner') const tenant: number = req.owner.id - if (logging.Network) { - console.log('=> updateContact called', { + sphinxLogger.info( + [ + '=> updateContact called', + { body: req.body, params: req.params, query: req.query, - }) - } + }, + ], + logging.Network + ) let attrs = extractAttrs(req.body) @@ -262,7 +269,7 @@ export const updateContact = async (req, res) => { .map((c) => c.id) if (contactIds.length == 0) return - console.log('=> send contact_key to', contactIds) + sphinxLogger.info(['=> send contact_key to', contactIds]) helpers.sendContactKeys({ contactIds: contactIds, sender: owner, @@ -274,11 +281,17 @@ export const updateContact = async (req, res) => { export const exchangeKeys = async (req, res) => { if (!req.owner) return failure(res, 'no owner') const tenant: number = req.owner.id - console.log('=> exchangeKeys called', { + sphinxLogger.info( + [ + '=> exchangeKeys called', + { body: req.body, params: req.params, query: req.query, - }) + }, + ], + logging.Network + ) const contact = await models.Contact.findOne({ where: { id: req.params.id, tenant }, @@ -297,13 +310,17 @@ export const exchangeKeys = async (req, res) => { export const createContact = async (req, res) => { if (!req.owner) return failure(res, 'no owner') const tenant: number = req.owner.id - if (logging.Network) { - console.log('=> createContact called', { + sphinxLogger.info( + [ + '=> createContact called', + { body: req.body, params: req.params, query: req.query, - }) - } + }, + ], + logging.Network + ) let attrs = extractAttrs(req.body) @@ -431,11 +448,13 @@ export const receiveContactKey = async (payload) => { const owner = payload.owner const tenant: number = owner.id - if (logging.Network) - console.log('=> received contact key from', sender_pub_key, tenant) + sphinxLogger.info( + ['=> received contact key from', sender_pub_key, tenant], + logging.Network + ) if (!sender_pub_key) { - return console.log('no pubkey!') + return sphinxLogger.error('no pubkey!') } const sender = await models.Contact.findOne({ @@ -466,7 +485,7 @@ export const receiveContactKey = async (payload) => { tenant ) } else { - console.log('DID NOT FIND SENDER') + sphinxLogger.info('DID NOT FIND SENDER') } if (msgIncludedContactKey) { @@ -481,10 +500,10 @@ export const receiveContactKey = async (payload) => { } export const receiveConfirmContactKey = async (payload) => { - console.log( + sphinxLogger.info([ `=> confirm contact key for ${payload.sender && payload.sender.pub_key}`, - JSON.stringify(payload) - ) + JSON.stringify(payload), + ]) const dat = payload.content || payload const sender_pub_key = dat.sender.pub_key @@ -495,7 +514,7 @@ export const receiveConfirmContactKey = async (payload) => { const tenant: number = owner.id if (!sender_pub_key) { - return console.log('no pubkey!') + return sphinxLogger.error('no pubkey!') } const sender = await models.Contact.findOne({
3
diff --git a/templates/examples/examples/examples/ConditionalChainingDemo.json b/templates/examples/examples/examples/ConditionalChainingDemo.json ] }, { - "args": [ - "" - ], - "next": "", + "qid": "32.chaining.demo.Over60", "a": "{{SessionAttributes.demo.name.FirstName}}, since you are over 60 let me recommend the movie First Man. It takes a look at the life of the astronaut, Neil Armstrong, and the legendary space mission that led him to become the first man to walk on the Moon.", - "r": { - "buttons": [ - { - "text": "", - "value": "" - } - ], - "subTitle": "", - "imageUrl": "", - "title": "", - "text": "", - "url": "" - }, - "t": "", - "elicitResponse": { - "response_sessionattr_namespace": "", - "responsebot_hook": "" - }, "alt": { - "markdown": "{{SessionAttributes.demo.name.FirstName}}, since you are over 60 let me recommend the movie **First Man**. It takes a look at the life of the astronaut, Neil Armstrong, and the legendary space mission that led him to become the first man to walk on the Moon.", - "ssml": "" + "markdown": "{{SessionAttributes.demo.name.FirstName}}, since you are over 60 let me recommend the movie **First Man**. It takes a look at the life of the astronaut, Neil Armstrong, and the legendary space mission that led him to become the first man to walk on the Moon." }, - "conditionalChaining": "", - "l": "", - "qid": "32.chaining.demo.Over60", + "conditionalChaining": "'Leave Us Some Feedback'", "type": "qna", "q": [ "Over 60" ] }, { - "args": [ - "" - ], - "next": "", + "qid": "30.chaining.demo.Between12and60", "a": "{{SessionAttributes.demo.name.FirstName}}, since you are between 12 and 60, let me recommend the movie 2001: A Space Odyssey. It is a 1968 epic science fiction film that takes place in outer space.", - "r": { - "buttons": [ - { - "text": "", - "value": "" - } - ], - "subTitle": "", - "imageUrl": "", - "title": "", - "text": "", - "url": "" - }, - "t": "", - "elicitResponse": { - "response_sessionattr_namespace": "", - "responsebot_hook": "" - }, "alt": { - "markdown": "{{SessionAttributes.demo.name.FirstName}}, since you are between 12 and 60, let me recommend the movie **2001: A Space Odyssey**. It is a 1968 epic science fiction film that takes place in outer space.", - "ssml": "" + "markdown": "{{SessionAttributes.demo.name.FirstName}}, since you are between 12 and 60, let me recommend the movie **2001: A Space Odyssey**. It is a 1968 epic science fiction film that takes place in outer space." }, - "conditionalChaining": "", - "l": "", - "qid": "30.chaining.demo.Between12and60", + "conditionalChaining": "'Leave Us Some Feedback'", "type": "qna", "q": [ "Between 12 and 60" ] }, { - "args": [ - "" - ], - "next": "", + "qid": "31.chaining.demo.Under12", "a": "{{SessionAttributes.demo.name.FirstName}}, since you are under 12, I recommend watching Disney's WALL-E. It's a wonderful cartoon about a robot looking for a friend.", - "r": { - "buttons": [ - { - "text": "", - "value": "" - } - ], - "subTitle": "", - "imageUrl": "", - "title": "", - "text": "", - "url": "" + "alt": { + "markdown": "{{SessionAttributes.demo.name.FirstName}}, since you are under 12, I recommend watching Disney's **WALL-E**. It's a wonderful cartoon about a robot looking for a friend." }, - "t": "", - "elicitResponse": { - "response_sessionattr_namespace": "", - "responsebot_hook": "" + "conditionalChaining": "'Leave Us Some Feedback'", + "type": "qna", + "q": [ + "Under 12" + ] }, + { + "qid": "40.leave.feedback", + "a": "Please give us some feedback about this selection.", "alt": { - "markdown": "{{SessionAttributes.demo.name.FirstName}}, since you are under 12, I recommend watching Disney's **WALL-E**. It's a wonderful cartoon about a robot looking for a friend.", - "ssml": "" + "markdown": "***Please give us some feedback about this selection?***" + }, + "elicitResponse": { + "responsebot_hook": "QNAFreeText", + "response_sessionattr_namespace": "demo.comment" }, - "conditionalChaining": "", - "l": "", - "qid": "31.chaining.demo.Under12", "type": "qna", "q": [ - "Under 12" + "Leave Us Some Feedback" ] } ]
3
diff --git a/scripts/package.js b/scripts/package.js @@ -4,8 +4,8 @@ import fs from 'fs' import path from 'path' import { rollup } from 'rollup' import babel from 'rollup-plugin-babel' -import resolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' +import resolve from 'rollup-plugin-node-resolve' import process from 'process' const baseDir = process.env.npm_config_baseDir @@ -13,35 +13,30 @@ const dest = path.join(baseDir, 'dist/') let logging = true +const inputOptions = { + input: path.join(baseDir, 'src/index.js'), + plugins: [resolve({ browser: true }), commonjs(), babel()], +} + export const release = () => { return new Promise(resolve => { - return getName().then(data => { - return ensureDir().then(() => { - return Promise.all([ - copyMetadata(), - copyAppFiles(), - copyAppSrc(), - bundleApp(data), - bundleAppEs5(data), - ]) - .then(() => pack(data)) - .then(() => { + return build().then(data => { + pack(data).then(() => { data.absolutePath = `${baseDir}/${data.identifier}.tgz` - log('MPK file created! ', data.absolutePath) + log('MPK file created! ' + data.absolutePath) resolve(data) }) }) }) - }) } export const build = () => { return new Promise(resolve => { - return getName() - .then(data => { + return Promise.all([getName(), copyFiles()]) + .then(res => { + let data = res[0] return Promise.all([copyStartApp(), bundleApp(data), bundleAppEs5(data)]).then(() => { - data.absolutePath = `${baseDir}/dist/${data.identifier}.tgz` - log('Files written to ' + data.absolutePath) + log('Files written to ' + dest) resolve(data) }) }) @@ -60,8 +55,7 @@ function getName() { ) } - const contents = res.toString() - const data = JSON.parse(contents) + const data = JSON.parse(res.toString()) if (!data.identifier) { return reject(new Error("Can't find identifier in metadata.json file")) @@ -80,74 +74,37 @@ function getName() { }) } -const ensureDir = () => { - return new Promise(resolve => { - if (fs.existsSync(dest)) shell.rm('-r', dest) - - fs.mkdirSync(dest) - - resolve() - }) -} - -const copyMetadata = () => { - return new Promise(resolve => { - fs.copyFile(path.join(baseDir, 'metadata.json'), dest, resolve) - }) -} - -const copyAppFiles = () => { - return new Promise(resolve => { - //note: shelljs is sync - shell.cp('-r', path.join(baseDir, 'static/'), dest) - resolve() - }) -} - -const copyAppSrc = () => { - return new Promise(resolve => { - shell.cp('-r', path.join(baseDir, './src'), dest) - resolve() - }) -} - const bundleApp = data => { - let outputOptions = { + const outputOptionsEs6 = { format: 'iife', name: 'APP_' + data.identifier.replace(/[^0-9a-zA-Z_$]/g, '_'), file: path.join(baseDir, '/dist/appBundle.js'), } - let inputOptions = { - input: path.join(baseDir, 'src/index.js'), - plugins: [resolve({ browser: true }), commonjs(), babel()], - } - - return _bundleApp(inputOptions, outputOptions) + return _bundleApp(inputOptions, outputOptionsEs6) } const bundleAppEs5 = data => { - let outputOptionsEs5 = { + let inputOptionsEs5 = inputOptions + // FICSME add es5 specific plugins to the generic list + //inputOptionsEs5.plugins.concat([..]) + + const outputOptionsEs5 = { format: 'iife', name: 'APP_' + data.identifier.replace(/[^0-9a-zA-Z_$]/g, '_'), file: path.join(baseDir, '/dist/appBundle_es5.js'), } - let inputOptionsEs5 = { - input: path.join(baseDir, 'src/index.js'), - plugins: [resolve({ browser: true }), commonjs(), babel()], - } - return _bundleApp(inputOptionsEs5, outputOptionsEs5) } -const _bundleApp = (inputOptions, outputOptions) => { +const _bundleApp = (_inputOptions, _outputOptions) => { return new Promise(resolve => { - rollup(inputOptions) + rollup(_inputOptions) .then(bundle => { - bundle.generate(outputOptions).then(() => { - bundle.write(outputOptions).then(() => { - console.log('App bundle written to ' + outputOptions.file) + bundle.generate(_outputOptions).then(() => { + bundle.write(_outputOptions).then(() => { + console.log('App bundle written to ' + _outputOptions.file) resolve() }) }) @@ -156,6 +113,15 @@ const _bundleApp = (inputOptions, outputOptions) => { }) } +const copyFiles = () => { + return new Promise(resolve => { + //note: shelljs is sync + shell.cp('-r', path.join(baseDir, 'static/'), dest) + shell.cp('-r', path.join(baseDir, './src'), dest) + fs.copyFile(path.join(baseDir, 'metadata.json'), dest, resolve) + }) +} + const copyStartApp = () => { fs.copyFile( path.join(process.cwd(), 'support/startApp.js'), @@ -173,7 +139,6 @@ const pack = data => { } const tar = (src, dest) => { - console.log('tar', src, dest) return new Promise((resolve, reject) => { targz.compress( { @@ -185,7 +150,7 @@ const tar = (src, dest) => { log('ERR:', err) reject(err) } else { - log(`TAR: ${src}`) + //log(`TAR: ${src}`) resolve() } }
7
diff --git a/src/components/views/LongRangeComm/core.js b/src/components/views/LongRangeComm/core.js @@ -83,6 +83,13 @@ class LRCommCore extends Component { : "" }`} onClick={() => this.setState({ selectedMessage: m.id })} + title={`${m.sent === true ? "Sent" : ""} ${ + m.deleted === true ? "Deleted" : "" + } ${ + m.approved === true && !m.sent && !m.deleted + ? "Approved" + : "" + }`} > {m.datestamp} - {m.sender} </li>
7
diff --git a/package.json b/package.json "description": "A library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs", "main": "build/ccxt.es5.js", "unpkg": "build/ccxt.browser.js", + "engines" : { "node" : ">=7.6.0" }, "repository": { "type": "git", "url": "https://github.com/kroitor/ccxt.git"
12
diff --git a/src/layers/core/hexagon-layer/hexagon-layer.js b/src/layers/core/hexagon-layer/hexagon-layer.js @@ -108,7 +108,7 @@ export default class HexagonLayer extends Layer { } renderLayers() { - const {id, radius, elevationScale, extruded, fp64} = this.props; + const {id, radius, elevationScale, extruded, coverage, fp64} = this.props; // base layer props const {opacity, pickable, visible} = this.props; @@ -123,6 +123,7 @@ export default class HexagonLayer extends Layer { elevationScale, angle: Math.PI, extruded, + coverage, fp64, opacity, pickable,
1
diff --git a/node/lib/cmd/checkout.js b/node/lib/cmd/checkout.js @@ -157,8 +157,9 @@ exports.executeableSubcommand = co.wrap(function *(args) { files); // If we're going to check out files, just do that - if (Object.keys(op.resolvedPaths).length !== 0) { - yield Checkout.checkoutFiles(repo, op.commit, op.resolvedPaths); + if (op.resolvedPaths !== null && + Object.keys(op.resolvedPaths).length !== 0) { + yield Checkout.checkoutFiles(repo, op); return; }
9
diff --git a/ot-node.js b/ot-node.js @@ -43,10 +43,11 @@ class OTNode { await this.saveNetworkModulePeerIdAndPrivKey(); await this.createProfiles(); - await this.initializeControllers(); await this.initializeCommandExecutor(); await this.initializeTelemetryInjectionService(); + await this.initializeControllers(); + this.logger.info('Node is up and running!'); } @@ -97,7 +98,7 @@ class OTNode { this.logger.info(`All modules initialized!`); } catch (e) { this.logger.error(`Module initialization failed. Error message: ${e.message}`); - process.exit(1); + this.stop(1); } } @@ -117,6 +118,7 @@ class OTNode { this.logger.error( `Http api router initialization failed. Error message: ${e.message}, ${e.stackTrace}`, ); + this.stop(1); } try { @@ -127,6 +129,7 @@ class OTNode { this.logger.error( `RPC router initialization failed. Error message: ${e.message}, ${e.stackTrace}`, ); + this.stop(1); } } @@ -170,7 +173,7 @@ class OTNode { if (!blockchainModuleManager.getImplementationsNames().length) { this.logger.info(`Unable to create blockchain profiles. OT-node shutting down...`); - process.exit(1); + this.stop(1); } } @@ -193,6 +196,7 @@ class OTNode { this.logger.error( `Command executor initialization failed. Error message: ${e.message}`, ); + this.stop(1); } } @@ -270,9 +274,9 @@ class OTNode { this.config.otNodeUpdated = true; } - stop() { + stop(code = 0) { this.logger.info('Stopping node...'); - process.exit(0); + process.exit(code); } }
3
diff --git a/userscript.user.js b/userscript.user.js @@ -1749,7 +1749,7 @@ var $$IMU_EXPORT$$; // http://image.news1.kr/system/photos/2014/8/22/985836/original.jpg // http://image.news1.kr/system/photos/2018/6/15/3162887/high.jpg -- 1400x1867 // http://image.news1.kr/system/photos/2018/6/15/3162887/original.jpg -- 1500x2000 - return src + newsrc = src .replace(/\/thumbnails\/(.*)\/thumb_[0-9]+x(?:[0-9]+)?(\.[^/.]*)$/, "/$1/original$2") .replace(/main_thumb\.jpg/, "original.jpg") .replace(/article.jpg/, "original.jpg") @@ -1757,6 +1757,16 @@ var $$IMU_EXPORT$$; .replace(/photo_sub_thumb.jpg/, "original.jpg") .replace(/section_top\.jpg/, "original.jpg") .replace(/high\.jpg/, "original.jpg"); + + var filename = src.replace(/.*\/photos\/+[0-9]{4}\/+(?:[0-9]{1,2}\/+){2}([0-9]+)\/+.*$/, "$1"); + if (filename !== src) { + return { + url: newsrc, + filename: filename + }; + } + + return newsrc; } if (domain.indexOf(".joins.com") >= 0) { @@ -5311,7 +5321,7 @@ var $$IMU_EXPORT$$; // https://d2t7cq5f1ua57i.cloudfront.net/images/r_images/51261/54063/51261_54063_77_0_8968_20141223201250892_200x200.jpg domain === "d2t7cq5f1ua57i.cloudfront.net" || // https://image.ibb.co/fmOKNJ/h_54456811_768x530.jpg - domain === "image.ibb.co" || + //domain === "image.ibb.co" || // http://socdn.smtown.com/upload/smtownnow/pictures/images/2018/06/15/o_1cg12bap41e5v3vh1iu2mhkjaj9_600x800.jpg domain === "socdn.smtown.com" || // http://www.lecturas.com/medio/2018/03/14/andrea-duro-4_6a8880f6_800x1200.jpg @@ -19572,8 +19582,43 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { //return src.replace(/:\/\/[^/]*\/([0-9a-zA-Z]+\/[^/]*_id[0-9]{5,}[_.])/, "://image.ibb.co/$1"); } - if (domain === "image.ibb.co" || - domain === "preview.ibb.co") { + if ((domain === "i.ibb.co" || + // https://image.ibb.co/jYsMbo/Screenshot-2018-07-12-15-56-41.png + // https://image.ibb.co/gp6Q2T/Screenshot-2018-07-12-15-56-41.png + domain === "image.ibb.co" || + // https://preview.ibb.co/jYsMbo/Screenshot_2018_07_12_15_56_41.png + // https://image.ibb.co/gp6Q2T/Screenshot-2018-07-12-15-56-41.png + domain === "preview.ibb.co") && + options && options.cb && options.do_request) { + // https://i.ibb.co/7QrHRXp/tshd398yeae31-copy.jpg + // https://i.ibb.co/8bPJd0x/image.jpg + // https://i.ibb.co/FX890KY/tshd398yeae31-copy.jpg + match = src.match(/^[a-z]+:\/\/[^/]*\/+([-_A-Za-z0-9=]+)\/+([^?#]*?)(\.[^/.]*)?(?:[?#].*)?$/); + if (match) { + options.do_request({ + method: "GET", + url: "https://ibb.co/" + match[1], + onload: function(result) { + if (result.readyState === 4) { + var tmatch = result.responseText.match(/CHV\.obj\.image_viewer\.image\s*=\s*{.*?[^a-zA-Z0-9_]url:["'](.*?)["']/); + if (tmatch) { + // norecurse: true? + return options.cb(tmatch[1]); + } + + options.cb(null); + } + } + }); + + return { + waiting: true + }; + } + } + + if (false && (domain === "image.ibb.co" || + domain === "preview.ibb.co")) { // https://image.ibb.co/gfffEy/russia_players_celebrate_following_their_sides_victory_in_a_penalty_picture_id988998656_story_large_9c8c1668_4d53_4b55_ac5c_f7bd71b7f407.jpg // https://image.ibb.co/gfffEy/russia_players_celebrate_following_their_sides_victory_in_a_penalty_picture_id988998656.jpg // https://preview.ibb.co/gfffEy/russia_players_celebrate_following_their_sides_victory_in_a_penalty_picture_id988998656_story_large_9c8c1668_4d53_4b55_ac5c_f7bd71b7f407.jpg @@ -36459,6 +36504,10 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { }; var parse_bigimage = function(big) { + if (_nir_debug_) { + console_log("parse_bigimage (big)", big); + } + if (!big) { if (newhref === url && options.null_if_no_change) newhref = big; @@ -36466,6 +36515,10 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { } var newhref1 = fullurl_obj(currenthref, big); + if (_nir_debug_) { + console_log("parse_bigimage (newhref1)", newhref1); + } + if (!newhref1) { return false; }
7
diff --git a/js/appSelector.js b/js/appSelector.js @@ -103,8 +103,13 @@ var ammedWidthSelector = createFmapSelector( var index = state => ({...state, index: indexSelector(state)}); var avg = state => ({...state, data: mergeKeys(state.data, avgSelector(state))}); -var match = state => _.Let((m = matchSelector(state), hl = _.spy('s', state.highlightSelect)) => - ({...state, samplesMatched: hl == null ? _.last(m.matches) : m.matches[hl], allMatches: m})); +var match = state => _.Let((m = matchSelector(state), hl = state.highlightSelect) => + ({ + ...state, + samplesMatched: !m.matches ? null : + hl == null ? _.last(m.matches) : + m.matches[hl], + allMatches: m})); var sort = state => ({...state, samples: sortSelector(state)}); var transform = state => ({...state, columns: mergeKeys(state.columns, transformSelector(state))}); var ammedWidth = state => ({...state, columns: ammedWidthSelector(state)});
9
diff --git a/packages/jaeger-ui/src/model/ddg/GraphModel/index.tsx b/packages/jaeger-ui/src/model/ddg/GraphModel/index.tsx @@ -107,55 +107,6 @@ export default class GraphModel { Object.freeze(this.visIdxToPathElem); } - // // This function assumes the density is set to PPE with distinct operations - // // It is a class property so that it can be aware of density in late-alpha - // // - // // It might make sense to live on PathElem so that pathElems can be compared when checking how many - // // inbound/outbound edges are visible for a vertex, but maybe not as vertices could be densitiy-aware and - // // provide that to this fn. could also be property on pathElem that gets set by showElems - // // tl;dr may move in late-alpha - // private getVertexKey = (pathElem: PathElem): string => { - // const elemToStr = this.showOp - // ? ({ operation }: PathElem) => `${operation.service.name}----${operation.name}` - // : // Always show the operation for the focal node, i.e. when distance === 0 - // ({ distance, operation }: PathElem) => - // distance === 0 ? `${operation.service.name}----${operation.name}` : operation.service.name; - - // switch (this.density) { - // case EDdgDensity.MostConcise: { - // return elemToStr(pathElem); - // } - // case EDdgDensity.UpstreamVsDownstream: { - // return `${elemToStr(pathElem)}=${Math.sign(pathElem.distance)}`; - // } - // case EDdgDensity.PreventPathEntanglement: - // case EDdgDensity.ExternalVsInternal: { - // const decorate = - // this.density === EDdgDensity.ExternalVsInternal - // ? (str: string) => `${str}${pathElem.isExternal ? '----external' : ''}` - // : (str: string) => str; - // const { memberIdx, memberOf } = pathElem; - // const { focalIdx, members } = memberOf; - - // return decorate( - // members - // .slice(Math.min(focalIdx, memberIdx), Math.max(focalIdx, memberIdx) + 1) - // .map(elemToStr) - // .join('____') - // ); - // } - // default: { - // throw new Error( - // `Density: ${this.density} has not been implemented, try one of these: ${JSON.stringify( - // EDdgDensity, - // null, - // 2 - // )}` - // ); - // } - // } - // }; - private getDefaultVisiblePathElems() { return ([] as PathElem[]).concat( this.distanceToPathElems.get(-2) || [],
2
diff --git a/token-metadata/0xEDD7c94FD7B4971b916d15067Bc454b9E1bAD980/metadata.json b/token-metadata/0xEDD7c94FD7B4971b916d15067Bc454b9E1bAD980/metadata.json "symbol": "ZIPT", "address": "0xEDD7c94FD7B4971b916d15067Bc454b9E1bAD980", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/articles/email/templates.md b/articles/email/templates.md @@ -139,7 +139,9 @@ For example, you can refer to attributes in the template to control flow as foll #### Using Markdown Syntax -> Use of Markdown in email templates has been deprecated, so you will no longer be able to add new Markdown formatting. If you have an existing template in Markdown, you will be able to toggle from Markdown to Liquid, but changing this setting will result in you losing any existing Markdown, as well as the ability to use Markdown. +::: panel-danger Deprecation Notice +Use of Markdown in email templates has been deprecated, so you will no longer be able to add new Markdown formatting. If you have an existing template in Markdown, you will be able to toggle from Markdown to Liquid, but changing this setting will result in you losing any existing Markdown, as well as the ability to use Markdown. +::: The use of Markdown in email templating has been **deprecated**, and is only available for templates which were already using Markdown as the templating syntax. The available attributes for Markdown syntax are:
14
diff --git a/assets/js/components/legacy-notifications/notification.js b/assets/js/components/legacy-notifications/notification.js @@ -188,7 +188,7 @@ function Notification( { if ( 'win-warning' === type ) { icon = <Warning width={ 34 } />; } else if ( 'win-error' === type ) { - icon = <Error width={ 34 } />; + icon = <Error width={ 28 } />; } else { icon = ''; }
12
diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js @@ -16,7 +16,12 @@ function getPreferredCurrency() { }, 1600); } -function setNewIOUReportObjects(reportIds) { +/** + * @param {Array} reportIds + * @returns {Promise} + * Gets the IOU Reports for new transaction + */ +function getIOUReportsForNewTransaction(reportIds) { return API.Get({ returnValueList: 'reportStuff', reportIDList: reportIds, @@ -65,7 +70,7 @@ function createIOUTransaction({ debtorEmail, }) .then(data => data.reportID) - .then(reportID => setNewIOUReportObjects([reportID])); + .then(reportID => getIOUReportsForNewTransaction([reportID])); } /** @@ -99,7 +104,7 @@ function createIOUSplit({ reportID, })) .then(data => data.reportIDList) - .then(reportIDList => setNewIOUReportObjects(reportIDList)); + .then(reportIDList => getIOUReportsForNewTransaction(reportIDList)); } export {
12
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-masthead/sprk-masthead.interfaces.ts b/angular/projects/spark-angular/src/lib/components/sprk-masthead/sprk-masthead.interfaces.ts @@ -12,9 +12,6 @@ export interface ISprkBigNavLink { text: string; /** * The `href` value for the link. - * If omitted, the href will - * be set to `#` by the `SprkLink` - * component. */ href?: string; /** @@ -54,9 +51,6 @@ export interface ISprkNarrowNavLink { text: string; /** * The `href` value for the link. - * If omitted, the href will - * be set to `#` by the `SprkLink` - * component. */ href?: string; /** @@ -91,9 +85,6 @@ export interface ISprkNarrowNavLink { text: string; /** * The `href` value for the link. - * If omitted, the href will - * be set to `#` by the `SprkLink` - * component. */ href?: string; /**
3
diff --git a/constants.js b/constants.js @@ -2,11 +2,11 @@ export const baseUnit = 4; export const previewExt = 'jpg'; export const rarityColors = { - common: [0xCACACA, 0x7B7B7B], - uncommon: [0x80cf3f, 0x3a7913], - rare: [0x2fd5e8, 0x1258a2], - epic: [0xbd3ffa, 0x460d7f], - legendary: [0xfdae53, 0xff7605], + common: [0xDCDCDC, 0x373737], + uncommon: [0xff8400, 0x875806], + rare: [0x00CE21, 0x00560E], + epic: [0x00B3DB, 0x003743], + legendary: [0xAD00EA, 0x32002D], }; export const storageHost = 'https://ipfs.exokit.org';
3
diff --git a/src/snapshot/filesaver.js b/src/snapshot/filesaver.js @@ -49,6 +49,13 @@ function fileSaver(url, name, format) { return resolve(name); } + // Older versions of Safari did not allow downloading of blob urls + if(Lib.isSafari()) { + var prefix = format === 'svg' ? ',' : ';base64,'; + helpers.octetStream(prefix + encodeURIComponent(url)); + return resolve(name); + } + reject(new Error('download error')); });
0
diff --git a/src/js/core.js b/src/js/core.js @@ -1315,7 +1315,7 @@ s.touchEvents = { // WP8 Touch Events Fix if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) { - (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction); + (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass(s.params.containerModifierClass + 'wp8-' + s.params.direction); } // Attach/detach events
4
diff --git a/src/utils/fullScreenWidthPixels.js b/src/utils/fullScreenWidthPixels.js import devicePixelRatio from "./devicePixelRatio"; +const SSR_FALLBACK_WIDTH_PX = 945; + function fullScreenWidthPixels() { + if (typeof window === "undefined") { + return SSR_FALLBACK_WIDTH_PX; + } + const screenWidth = window.screen.width; return screenWidth * devicePixelRatio();
12
diff --git a/sirepo/pkcli/job_cmd.py b/sirepo/pkcli/job_cmd.py @@ -32,6 +32,8 @@ def default_command(in_file): Returns: str: json output of command, e.g. status msg """ + r = None + try: f = pkio.py_path(in_file) msg = pkjson.load_any(f) #TODO(e-carlin): find common place to serialize/deserialize paths @@ -43,10 +45,14 @@ def default_command(in_file): ) if res is None: return - return pkjson.dump_pretty( - PKDict(res).pksetdefault(state=job.COMPLETED), - pretty=False, + r = PKDict(res).pksetdefault(state=job.COMPLETED) + except Exception as e: + r = PKDict( + state=job.ERROR, + error=e.sr_args.error if isinstance(e, sirepo.util.UserAlert) else str(e), + stack=pkdexc(), ) + return pkjson.dump_pretty(r, pretty=False) def _background_percent_complete(msg, template, is_running): @@ -72,7 +78,6 @@ def _do_cancel(msg, template): def _do_compute(msg, template): msg.runDir = pkio.py_path(msg.runDir) - try: with msg.runDir.join(template_common.RUN_LOG).open('w') as run_log: p = subprocess.Popen( _do_prepare_simulation(msg, template).cmd, @@ -96,11 +101,6 @@ def _do_compute(msg, template): return PKDict(state=job.ERROR, error='non zero returncode={}'.format(r)) else: return PKDict(state=job.COMPLETED) - except sirepo.util.UserAlert as e: - return PKDict(state=job.ERROR, error=e.sr_args.error, stack=pkdexc()) - except Exception as e: - return PKDict(state=job.ERROR, error=str(e), stack=pkdexc()) - # DOES NOT RETURN def _do_get_simulation_frame(msg, template):
9
diff --git a/fileserver/client.js b/fileserver/client.js @@ -13,11 +13,15 @@ let basedir=path.resolve(__dirname, '../web/images/'); console.log('Base dir=',basedir); -let p=async function() { +let test_fn=async function(address) { let client=new BisFileServerClient(WebSocket); - await client.authenticate(); + try { + await client.authenticate('',`ws://${address}:8081`); + } catch(e) { + await client.authenticate('','ws://localhost:8081'); + } genericio.setFileServerObject(client); @@ -104,8 +108,10 @@ let p=async function() { process.exit(); }; +require('dns').lookup(require('os').hostname(), function (err, add, fam) { try { - p(); + test_fn(add); } catch(e) { console.log("Error",e); } +});
11
diff --git a/iris/mutations/community/pinThread.js b/iris/mutations/community/pinThread.js @@ -29,7 +29,7 @@ export default async ( getThreads([threadId]), ]); - if (!permissions.isOwner) { + if (!permissions.isOwner && !permissions.isModerator) { return new UserError("You don't have permission to do this."); }
11
diff --git a/lib/documents.js b/lib/documents.js @@ -2983,9 +2983,9 @@ function readAllDocumentsErrorHandle(jobState, batchdef, readBatchArray, readerI errorDisposition = err; } if(errorDisposition instanceof Error){ - jobState.docsFailedToBeWritten += readBatchArray.length; + jobState.docsFailedToBeRead += readBatchArray.length; jobState.error = errorDisposition; - jobState.stream.emit('error', errorDisposition); + jobState.outputStream.emit('error', errorDisposition); finishReader(jobState); } else if(errorDisposition === null || (Array.isArray(errorDisposition) && errorDisposition.length === 0)) {
1
diff --git a/test/integration/migrate/index.js b/test/integration/migrate/index.js @@ -410,7 +410,8 @@ module.exports = function(knex) { // Map the table names to promises that evaluate chai expectations to // confirm that the table exists and the 'id' and 'name' columns exist // within the table - return Bluebird.map(tables, function(table) { + return Promise.all( + tables.map(function(table) { return knex.schema.hasTable(table).then(function(exists) { expect(exists).to.equal(true); if (exists) { @@ -424,7 +425,8 @@ module.exports = function(knex) { ]); } }); - }); + }) + ); }); }); @@ -459,11 +461,13 @@ module.exports = function(knex) { 'migration_test_4_1', ]; - return Bluebird.map(expectedTables, function(table) { + return Promise.all( + expectedTables.map(function(table) { return knex.schema.hasTable(table).then(function(exists) { expect(exists).to.equal(true); }); - }); + }) + ); }); }); @@ -484,11 +488,13 @@ module.exports = function(knex) { }); it('should drop tables as specified in the batch', function() { - return Bluebird.map(tables, function(table) { + return Promise.all( + tables.map(function(table) { return knex.schema.hasTable(table).then(function(exists) { expect(!!exists).to.equal(false); }); - }); + }) + ); }); }); @@ -531,11 +537,13 @@ module.exports = function(knex) { }); it('should drop tables as specified in the batch', () => { - return Bluebird.map(tables, function(table) { + return Promise.all( + tables.map(function(table) { return knex.schema.hasTable(table).then(function(exists) { expect(!!exists).to.equal(false); }); - }); + }) + ); }); }); @@ -576,11 +584,13 @@ module.exports = function(knex) { }); it('should drop tables as specified in the batch', () => { - return Bluebird.map(tables, function(table) { + return Promise.all( + tables.map(function(table) { return knex.schema.hasTable(table).then(function(exists) { expect(!!exists).to.equal(false); }); - }); + }) + ); }); }); @@ -746,8 +756,7 @@ module.exports = function(knex) { } it('is not able to run two migrations in parallel when transactions are disabled', function() { - return Bluebird.map( - [ + const migrations = [ knex.migrate .latest({ directory: 'test/integration/migrate/test', @@ -764,10 +773,10 @@ module.exports = function(knex) { .catch(function(err) { return err; }), - ], - function(res) { - return res && res.name; - } + ]; + + return Promise.all( + migrations.map((migration) => migration.then((res) => res && res.name)) ).then(function(res) { // One should fail: const hasLockError = @@ -993,7 +1002,8 @@ module.exports = function(knex) { 'migration_test_2', 'migration_test_2_1a', ]; - return Bluebird.map(tables, function(table) { + return Promise.all( + tables.map(function(table) { return knex.schema.hasTable(table).then(function(exists) { expect(exists).to.equal(true); if (exists) { @@ -1007,7 +1017,8 @@ module.exports = function(knex) { ]); } }); - }); + }) + ); }); it('should not create unexpected tables', function() {
14
diff --git a/src/assets/drizzle/scripts/pagination/long.js b/src/assets/drizzle/scripts/pagination/long.js * These identify the previous and next links in the pagination components. */ import { updatePageStyles } from './default'; -import { pagination } from '../../../../../packages/spark-core/components/pagination'; +import { setAriaLabel } from '../../../../../packages/spark-core/components/pagination'; const longPag = document.querySelector('[data-sprk-pagination="long"]'); @@ -58,7 +58,7 @@ if (longPag) { link2.textContent = maxPageNum; } } - pagination(item); + setAriaLabel(currentPage); }); });
4
diff --git a/src/widgets/histogram/chart.js b/src/widgets/histogram/chart.js @@ -228,6 +228,8 @@ module.exports = cdb.core.View.extend({ var loBarIndex = this.model.get('lo_index'); var hiBarIndex = this.model.get('hi_index'); this.selectRange(loBarIndex, hiBarIndex); + this._updateAxisTip('left'); + this._updateAxisTip('right'); }, _onChangeNormalized: function () { @@ -372,8 +374,6 @@ module.exports = cdb.core.View.extend({ this._calcBarWidth(); this._generateChartContent(); this._generateShadowBars(); - this._updateAxisTip('left'); - this._updateAxisTip('right'); }, refresh: function () {
7
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -262,11 +262,6 @@ final class Analytics extends Module $gtag_opt = array(); - $amp_client_id_optin = $this->get_data( 'amp-client-id-opt-in' ); - if ( ! is_wp_error( $amp_client_id_optin ) && $amp_client_id_optin ) { - $gtag_opt['useAmpClientId'] = true; - } - $anonymize_ip = $this->get_data( 'anonymize-ip' ); if ( ! is_wp_error( $anonymize_ip ) && $anonymize_ip ) { // See https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization.
2
diff --git a/client/src/stores/initApp.js b/client/src/stores/initApp.js @@ -3,6 +3,7 @@ import message from '../common/message'; import { refreshAppContext } from './config'; import fetchJson from '../utilities/fetch-json'; import sortBy from 'lodash/sortBy'; +const queryString = require('query-string'); window.localforage = localforage; @@ -56,6 +57,25 @@ const initApp = async (state) => { update.selectedConnectionId = selectedConnectionId; } } + + const qs = queryString.parse(window.location.search); + const qsConnectionName = qs.connectionName; + if (qsConnectionName) { + const selectedConnection = connections.find( + (c) => c.name === qsConnectionName + ); + if (Boolean(selectedConnection)) + update.selectedConnectionId = selectedConnection.id; + } + + const qsConnectionId = qs.connectionId; + if (qsConnectionId) { + const selectedConnection = connections.find( + (c) => c.id === qsConnectionId + ); + if (Boolean(selectedConnection)) + update.selectedConnectionId = selectedConnection.id; + } } return update; } catch (error) {
11
diff --git a/packages/lib/src/settings/options/layoutParams_info_sizeUnits.js b/packages/lib/src/settings/options/layoutParams_info_sizeUnits.js import { INPUT_TYPES } from '../utils/constants'; import { default as GALLERY_CONSTS } from '../../common/constants'; import { createOptions } from '../utils/utils'; -import width from './layoutParams_info_width'; export default { title: 'Text Box Width Units', description: `Set the text box width in pixels or as a percent from the column width and height.`, - isRelevant: (options) => width.isRelevant(options), + isRelevant: (options) => + options.isVertical && + options.groupSize === 1 && + options.scrollDirection === GALLERY_CONSTS.scrollDirection.VERTICAL && + GALLERY_CONSTS.hasExternalHorizontalPlacement(options.titlePlacement), type: INPUT_TYPES.OPTIONS, options: createOptions('textBoxWidthCalculationOptions'), default: GALLERY_CONSTS.textBoxWidthCalculationOptions.PERCENT,
2