conflict_resolution
stringlengths
27
16k
<<<<<<< export interface RemoteCallGetRelationshipTypeParams { qualifiedrelationshipTypeName:string; format:string; } export interface RemoteCallGetRelationshipTypeResult extends RemoteCallResultBase { iconUrl:string; relationshiptType:RelationshipType; } ======= export interface RemoteCallCreateOrUpdateRelationshipTypeParams { relationshipType:string; iconReference:string; } export interface RemoteCallCreateOrUpdateRelationshipTypeResult extends RemoteCallResultBase { created:bool; updated:bool; } >>>>>>> export interface RemoteCallGetRelationshipTypeParams { qualifiedrelationshipTypeName:string; format:string; } export interface RemoteCallGetRelationshipTypeResult extends RemoteCallResultBase { iconUrl:string; relationshiptType:RelationshipType; } export interface RemoteCallCreateOrUpdateRelationshipTypeParams { relationshipType:string; iconReference:string; } export interface RemoteCallCreateOrUpdateRelationshipTypeResult extends RemoteCallResultBase { created:bool; updated:bool; } <<<<<<< relationshipType_get (params:RemoteCallGetRelationshipTypeParams, callback:(result:RemoteCallGetRelationshipTypeResult)=>void):void; relationshipType_createOrUpdate (params, callback):void; ======= relationshipType_get (params, callback):void; relationshipType_createOrUpdate (params:RemoteCallCreateOrUpdateRelationshipTypeParams, callback:(result:RemoteCallCreateOrUpdateRelationshipTypeResult)=>void):void; >>>>>>> relationshipType_get (params:RemoteCallGetRelationshipTypeParams, callback:(result:RemoteCallGetRelationshipTypeResult)=>void):void; relationshipType_createOrUpdate (params:RemoteCallCreateOrUpdateRelationshipTypeParams, callback:(result:RemoteCallCreateOrUpdateRelationshipTypeResult)=>void):void;
<<<<<<< ///<reference path='HelpTextContainer.ts' /> ///<reference path='FormOccurrenceDraggableLabel.ts' /> ///<reference path='FormItemSetOccurrence.ts' /> ///<reference path='FormItemSetOccurrences.ts' /> ///<reference path='FormItemSetOccurrenceView.ts' /> ///<reference path='FormItemSetView.ts' /> ///<reference path='LayoutView.ts' /> ///<reference path='FieldSetLabel.ts' /> ///<reference path='FieldSetView.ts' /> ======= >>>>>>> ///<reference path='HelpTextContainer.ts' />
<<<<<<< return wemQ.all([defaultPromise, commonPromise, customPromise]).then(() => { // update active widget's height this.activeWidget.slideIn(); ======= updateWidgetsHeights() { this.widgetViews.forEach((widgetView: WidgetView) => { this.updateWidgetHeight(widgetView); >>>>>>> return wemQ.all([defaultPromise, commonPromise, customPromise]).then(() => { // update active widget's height this.activeWidget.slideIn(); <<<<<<< ======= if (this.item) { this.contentStatus = this.item.getModel().getCompareStatus(); if (this.defaultWidgetView && this.detailsContainer.hasChild(this.defaultWidgetView)) { this.detailsContainer.removeChild(this.defaultWidgetView); } this.setStatus(statusWidgetItemView); this.onContentStatusChanged(() => { this.setStatus(statusWidgetItemView); statusWidgetItemView.layout(); }); propWidgetItemView.setContent(this.item.getModel().getContentSummary()); userAccessWidgetItemView.setContentId(this.item.getModel().getContentId()); attachmentsWidgetItemView.setContent(this.item.getModel().getContentSummary()); this.defaultWidgetView = WidgetView.create(). setName(DetailsPanel.DEFAULT_WIDGET_NAME). setDetailsPanel(this). setLayoutCallbackFunction(() => { if (DetailsPanel.DEFAULT_WIDGET_NAME == this.activeWidget.getWidgetName()) { this.setActiveWidget(this.defaultWidgetView); } this.updateWidgetsHeights(); }). addWidgetItemView(statusWidgetItemView). addWidgetItemView(propWidgetItemView). addWidgetItemView(attachmentsWidgetItemView). addWidgetItemView(userAccessWidgetItemView). build(); this.detailsContainer.appendChild(this.defaultWidgetView); } } private initDefaultWidget() { >>>>>>> <<<<<<< setUseToggleButton(false). addWidgetItemView(this.statusWidgetItemView). addWidgetItemView(this.propWidgetItemView). addWidgetItemView(this.attachmentsWidgetItemView). addWidgetItemView(this.userAccessWidgetItemView). ======= >>>>>>> addWidgetItemView(this.statusWidgetItemView). addWidgetItemView(this.propWidgetItemView). addWidgetItemView(this.attachmentsWidgetItemView). addWidgetItemView(this.userAccessWidgetItemView). <<<<<<< setUseToggleButton(false). addWidgetItemView(this.versionsWidgetItemView). ======= addWidgetItemView(this.versionWidgetItemView). >>>>>>> addWidgetItemView(this.versionWidgetItemView).
<<<<<<< this.toolbar.appendChild(ContentPublishMenuManager.getPublishMenuButton()); ======= this.toolbar.appendChild(nonMobileDetailsPanelsManager.getToggleButton()); this.toolbar.appendChild(contentPublishMenuManager.getPublishMenuButton()); >>>>>>> this.toolbar.appendChild(nonMobileDetailsPanelsManager.getToggleButton()); this.toolbar.appendChild(ContentPublishMenuManager.getPublishMenuButton());
<<<<<<< var onFocusHandler = (e) => { this.resetInputHeight(); textAreaWrapper.addClass(focusedEditorCls); }; ======= tinymce.init({ selector: 'textarea.' + id.replace(/\./g, '_'), document_base_url: baseUrl + '/common/lib/tinymce/', skin_url: baseUrl + '/common/lib/tinymce/skins/lightgray', content_css: baseUrl + '/common/styles/api/form/inputtype/text/tinymce-editor.css', theme_url: 'modern', toolbar: [ "styleselect | cut copy pastetext | bullist numlist outdent indent | charmap anchor image link unlink | table | code" ], formats: { alignleft: [ { selector: 'img,figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: {textAlign: 'left'}, defaultBlock: 'div' }, {selector: 'table', collapsed: false, styles: {'float': 'left'}} ], aligncenter: [ { selector: 'img,figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: {textAlign: 'center'}, defaultBlock: 'div' }, {selector: 'table', collapsed: false, styles: {marginLeft: 'auto', marginRight: 'auto'}} ], alignright: [ { selector: 'img,figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: {textAlign: 'right'}, defaultBlock: 'div' }, {selector: 'table', collapsed: false, styles: {'float': 'right'}} ], alignjustify: [ { selector: 'img,figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: {textAlign: 'justify'}, defaultBlock: 'div' } ] }, menubar: false, statusbar: false, paste_as_text: true, plugins: ['autoresize', 'table', 'paste', 'charmap', 'code'], external_plugins: { "link": baseUrl + "/common/js/form/inputtype/text/plugins/link.js", "image": baseUrl + "/common/js/form/inputtype/text/plugins/image.js", "anchor": baseUrl + "/common/js/form/inputtype/text/plugins/anchor.js" }, object_resizing: "table", autoresize_min_height: 100, autoresize_bottom_margin: 0, height: 100, setup: (editor) => { editor.addCommand("openLinkDialog", this.openLinkDialog, this); editor.addCommand("openImageDialog", this.openImageDialog, this); editor.addCommand("openAnchorDialog", this.openAnchorDialog, this); editor.on('NodeChange', (e) => { this.notifyValueChanged(id, textAreaWrapper); }); editor.on('focus', (e) => { this.resetInputHeight(); textAreaWrapper.addClass(focusedEditorCls); }); editor.on('blur', (e) => { this.setStaticInputHeight(); this.hideDropdownMenu(); if (!(this.modalDialog && this.modalDialog.isVisible())) { textAreaWrapper.removeClass(focusedEditorCls); } }); editor.on('keydown', (e) => { if ((e.metaKey || e.ctrlKey) && e.keyCode === 83) { // Cmd-S or Ctrl-S e.preventDefault(); this.notifyValueChanged(id, textAreaWrapper); wemjq(this.getEl().getHTMLElement()).simulate(e.type, { // as editor resides in a frame - propagate event via wrapping element bubbles: e.bubbles, cancelable: e.cancelable, view: parent, ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey, keyCode: e.keyCode, charCode: e.charCode }); } if (e.keyCode == 46 || e.keyCode == 8) { // DELETE var selectedNode = editor.selection.getRng().startContainer; if (/^(FIGURE)$/.test(selectedNode.nodeName)) { var previousEl = selectedNode.previousSibling; e.preventDefault(); selectedNode.remove(); if (previousEl) { editor.selection.setNode(previousEl); } else { editor.focus(); } } } }); >>>>>>> var onFocusHandler = (e) => { this.resetInputHeight(); textAreaWrapper.addClass(focusedEditorCls); }; <<<<<<< HTMLAreaHelper.updateImageAlignmentBehaviour(editor); }); ======= this.updateImageAlignmentBehaviour(editor); this.onShown((event) => { // invoke auto resize on shown in case contents have been updated while inactive editor.execCommand('mceAutoResize', false, null); }) } }); >>>>>>> HTMLAreaHelper.updateImageAlignmentBehaviour(editor); this.onShown((event) => { // invoke auto resize on shown in case contents have been updated while inactive editor.execCommand('mceAutoResize', false, null); }); }); <<<<<<< ======= private getConvertedImageSrc(imgSrc: string): string { var contentId = api.util.UriHelper.trimUrlParams(imgSrc.replace(HtmlArea.imagePrefix, api.util.StringHelper.EMPTY_STRING)), imageUrlResolver = new api.content.ContentImageUrlResolver().setContentId(new api.content.ContentId(contentId)).setTimestamp(new Date()), scalingApplied = imgSrc.indexOf("scale=") > 0, urlParams = api.util.UriHelper.decodeUrlParams(imgSrc.replace("&amp;", "&")); scalingApplied ? imageUrlResolver.setScale(urlParams["scale"]) : imageUrlResolver.setScaleWidth(true); if (!urlParams["keepSize"]) { imageUrlResolver.setSize(HtmlArea.maxImageWidth); } var imageUrl = imageUrlResolver.resolve(); return "src=\"" + imageUrl + "\" data-src=\"" + imgSrc + "\""; } private processPropertyValue(propertyValue: string): string { var processedContent = propertyValue, regex = /<img.*?src="(.*?)"/g, imgSrcs; if (!processedContent) { return propertyValue; } >>>>>>>
<<<<<<< this.actionButton.setEnabled(false); return this.loadDescendantIds().then(() => { this.loadDescendants(0, 20). then((descendants: ContentSummaryAndCompareStatus[]) => { this.setDependantItems(descendants); if (!this.isAnyOnline(this.getItemList().getItems())) { this.verifyInstantDeleteVisibility(descendants); } this.countItemsToDeleteAndUpdateButtonCounter(); this.centerMyself(); }).finally(() => { this.loadMask.hide(); this.actionButton.setEnabled(true); }); }); ======= this.deleteButton.setEnabled(false); this.loadDescendants(items) .then((descendants: ContentSummaryAndCompareStatus[]) => { this.setDependantItems(descendants); if (!this.isAnyOnline(items)) { this.manageInstantDeleteStatus(descendants); } this.centerMyself(); }).finally(() => { this.loadMask.hide(); this.deleteButton.setEnabled(true); }); >>>>>>> this.actionButton.setEnabled(false); return this.loadDescendantIds().then(() => { this.loadDescendants(0, 20). then((descendants: ContentSummaryAndCompareStatus[]) => { this.setDependantItems(descendants); if (!this.isAnyOnline(this.getItemList().getItems())) { this.manageInstantDeleteStatus(descendants); } this.centerMyself(); }).finally(() => { this.loadMask.hide(); this.actionButton.setEnabled(true); }); });
<<<<<<< node.setChildren(this.dataToTreeNodes(dataList, node)); this.initData(this.root.getCurrentRoot().treeToList(), idPropertyName); ======= node.setChildren(this.dataToTreeNodes(dataList, node, expandAll)); this.initData(this.root.getCurrentRoot().treeToList()); >>>>>>> node.setChildren(this.dataToTreeNodes(dataList, node, expandAll)); this.initData(this.root.getCurrentRoot().treeToList(), idPropertyName);
<<<<<<< // TODO: add more subscriptions ======= public subscribeVisibleTimeRangeChange(handler: TimeRangeChangeEventHandler): void { this._timeRangeChanged.subscribe(handler); } public unsubscribeVisibleTimeRangeChange(handler: TimeRangeChangeEventHandler): void { this._timeRangeChanged.unsubscribe(handler); } public priceScale(priceScaleId?: string): IPriceScaleApi { if (priceScaleId === undefined) { warn('Using ChartApi.priceScale() method without arguments has been deprecated, pass valid price scale id instead'); } >>>>>>> public priceScale(priceScaleId?: string): IPriceScaleApi { if (priceScaleId === undefined) { warn('Using ChartApi.priceScale() method without arguments has been deprecated, pass valid price scale id instead'); }
<<<<<<< postLoad: () => void; ======= value: string; >>>>>>> postLoad: () => void; value: string;
<<<<<<< import {IssueList} from './IssueList'; ======= import {IssueSummary} from './IssueSummary'; import {IssueList, IssueListItem} from './IssueList'; >>>>>>> import {IssueList, IssueListItem} from './IssueList'; <<<<<<< ======= private loadMask: LoadMask; private issueDetailsDialog: IssueDetailsDialog; >>>>>>> private issueDetailsDialog: IssueDetailsDialog; <<<<<<< if (!panelHasChildren && panel.isVisible()) { // to not reload after tab is loaded and switching between tabs panel.appendChild(new IssueList(issueType)); ======= if (!panelHasChildren && panel.isVisible()) { // to not reload after tab is loaded and swithcing between tabs this.loadMask.show(); IssueFetcher.fetchIssuesByType(issueType).then((issues: IssueSummary[]) => { if (issues.length > 0) { const issueList: IssueList = new IssueList(); issueList.addItems(issues); panel.appendChild(issueList); issueList.onIssueSelected((issueListItem) => { this.showIssueDetailsDialog(issueListItem); }); this.centerMyself(); } else { panel.appendChild(new PEl('no-issues-message').setHtml('No issues found')); } }).catch((reason: any) => { api.DefaultErrorHandler.handle(reason); }).finally(() => { this.loadMask.hide(); }); >>>>>>> if (!panelHasChildren && panel.isVisible()) { // to not reload after tab is loaded and switching between tabs const issueList: IssueList = new IssueList(issueType); panel.appendChild(issueList); issueList.onIssueSelected((issueListItem) => { this.showIssueDetailsDialog(issueListItem); });
<<<<<<< textAreaEl.onRendered(() => { tinymce.init({ selector: 'textarea.' + clazz, document_base_url: baseUrl + '/common/lib/tinymce/', skin_url: baseUrl + '/common/lib/tinymce/skins/lightgray', theme_url: 'modern', toolbar: [ "styleselect | cut copy pastetext | bullist numlist outdent indent | charmap link unlink | table | code" ], menubar: false, statusbar: false, paste_as_text: true, plugins: ['autoresize', 'table', 'paste', 'charmap', 'code'], external_plugins: { "link": baseUrl + "/common/js/form/inputtype/text/plugins/link.js" }, autoresize_min_height: 100, autoresize_bottom_margin: 0, height: 100, setup: (editor) => { editor.addCommand("openLinkDialog", this.openLinkDialog, this); editor.on('change', (e) => { var value = this.newValue(this.getEditor(textAreaEl.getId()).getContent()); property.setValue(value); }); editor.on('focus', (e) => { this.resetInputHeight(); textAreaWrapper.addClass(focusedEditorCls); }); editor.on('blur', (e) => { this.setStaticInputHeight(); textAreaWrapper.removeClass(focusedEditorCls); }); editor.on('keydown', (e) => { if ((e.metaKey || e.ctrlKey) && e.keyCode === 83) { e.preventDefault(); var value = this.newValue(this.getEditor(textAreaEl.getId()).getContent()); property.setValue(value); // ensure that entered value is stored wemjq(this.getEl().getHTMLElement()).simulate(e.type, { // as editor resides in a frame - propagate event via wrapping element bubbles: e.bubbles, cancelable: e.cancelable, view: parent, ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey, keyCode: e.keyCode, charCode: e.charCode }); } }); }, init_instance_callback: (editor) => { this.setEditorContent(textAreaEl.getId(), property); this.setupStickyEditorToolbarForInputOccurence(textAreaWrapper); this.removeTooltipFromEditorArea(textAreaWrapper); } }); ======= this.editors.push({id: editorId, textAreaWrapper: textAreaWrapper, property: property}); >>>>>>> this.editors.push({id: editorId, textAreaWrapper: textAreaWrapper, property: property}); <<<<<<< interface LinkConfig { editor: TinyMceEditor link: HTMLElement ======= private removeTooltipFromEditorArea(inputOccurence: Element) { wemjq(inputOccurence.getHTMLElement()).find("iframe").removeAttr("title"); } handleDnDStart(event: Event, ui: JQueryUI.SortableUIParams): void { super.handleDnDStart(event, ui); var editorId = wemjq('textarea', ui.item)[0].id; this.destroyEditor(editorId); } handleDnDStop(event: Event, ui: JQueryUI.SortableUIParams): void { var editorId = wemjq('textarea', ui.item)[0].id; this.reInitEditor(editorId); tinymce.execCommand('mceAddEditor', false, editorId); this.getEditor(editorId).focus(); } private destroyEditor(id: string): void { this.getEditor(id).destroy(false); } private reInitEditor(id: string) { var savedEditor: TinyEditorOccurenceInfo = this.findElementByFieldValue(this.editors, "id", id); this.initEditor(id, savedEditor.property, savedEditor.textAreaWrapper); } private findElementByFieldValue<T>(array: Array<T>, field: string, value: any): T { var result: T; array.every((element: T) => { if (element[field] == value) { result = element; return false; } return true; }); return result; } } export interface TinyEditorOccurenceInfo { id: string; textAreaWrapper: Element; property: Property; >>>>>>> export interface TinyEditorOccurenceInfo { id: string; textAreaWrapper: Element; property: Property; } interface LinkConfig { editor: TinyMceEditor link: HTMLElement
<<<<<<< ///<reference path='ResolvePublishContentResultJson.ts' /> ======= ///<reference path='ResolvedPublishContentJson.ts' /> ///<reference path='ResolvedPublishRequestedContentJson.ts' /> ///<reference path='ResolvePublishDependenciesResultJson.ts' /> ///<reference path='ResolvePublishRequestedContentsResultJson.ts' /> ///<reference path='WidgetDescriptorJson.ts' /> ///<reference path='GetWidgetsByInterfaceResultJson.ts' /> >>>>>>> ///<reference path='ResolvePublishContentResultJson.ts' /> ///<reference path='WidgetDescriptorJson.ts' /> ///<reference path='GetWidgetsByInterfaceResultJson.ts' />
<<<<<<< fetch(node: TreeNode<NODE>): Q.Promise<NODE> { var deferred = Q.defer<NODE>(); ======= fetch(data: NODE): wemQ.Promise<NODE> { var deferred = wemQ.defer<NODE>(); >>>>>>> fetch(node: TreeNode<NODE>): wemQ.Promise<NODE> { var deferred = wemQ.defer<NODE>(); <<<<<<< fetchChildren(parentNode?: TreeNode<NODE>): Q.Promise<NODE[]> { var deferred = Q.defer<NODE[]>(); ======= fetchChildren(parentData?: NODE): wemQ.Promise<NODE[]> { var deferred = wemQ.defer<NODE[]>(); >>>>>>> fetchChildren(parentNode?: TreeNode<NODE>): wemQ.Promise<NODE[]> { var deferred = wemQ.defer<NODE[]>(); <<<<<<< private fetchData(parentNode?: TreeNode<NODE>): Q.Promise<NODE[]> { return parentNode ? this.fetchChildren(parentNode) : this.fetchRoot(); ======= private fetchData(parentData?: NODE): wemQ.Promise<NODE[]> { return parentData ? this.fetchChildren(parentData) : this.fetchRoot(); >>>>>>> private fetchData(parentNode?: TreeNode<NODE>): wemQ.Promise<NODE[]> { return parentNode ? this.fetchChildren(parentNode) : this.fetchRoot();
<<<<<<< this.appendChildToContentPanel(this.dockedPanel); this.appendChildToContentPanel(this.createNewIssueButton()); ======= this.createNewIssueButton(); this.appendChildToContentPanel(this.dockedPanel = this.createDockedPanel()); //this.appendChildToContentPanel(this.createNewIssueButton()); this.getContentPanel().getParentElement().appendChild(this.loadMask = new LoadMask(this)); >>>>>>> this.createNewIssueButton(); this.appendChildToContentPanel(this.dockedPanel);
<<<<<<< import User = api.security.User; ======= import Action = api.ui.Action; >>>>>>> import Action = api.ui.Action; import User = api.security.User;
<<<<<<< ======= import { RangeImpl } from './range-impl'; import { Series } from './series'; >>>>>>> import { RangeImpl } from './range-impl';
<<<<<<< * Wrap a function inside another to allow you to make adjustments to the parameters, or do other processing * either before the internal function is called or with its results. */ wrap<T>(fn: (...args: any[]) => any, wrapper: (...args: any[]) => T): (...args: any[]) => T; wrap<T>(fn: (...args: any[]) => any): (wrapper: (...args: any[]) => T) => (...args: any[]) => T; // wrap<T>: CurriedFn2<(...args: any[]) => any, (...args: any[]) => T, (...args: any[]) => T>; /** ======= >>>>>>> * Wrap a function inside another to allow you to make adjustments to the parameters, or do other processing * either before the internal function is called or with its results. */ wrap<T>(fn: (...args: any[]) => any, wrapper: (...args: any[]) => T): (...args: any[]) => T; wrap<T>(fn: (...args: any[]) => any): (wrapper: (...args: any[]) => T) => (...args: any[]) => T; // wrap<T>: CurriedFn2<(...args: any[]) => any, (...args: any[]) => T, (...args: any[]) => T>; /**
<<<<<<< mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: { [index: Prop]: T }) => TResult, obj: { [index: Prop]: T }): { [index: Prop]: TResult }; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: any) => TResult, obj: any): {[index: Prop]: TResult}; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: { [index: Prop]: T }) => TResult): (obj: { [index: Prop]: T }) => { [index: Prop]: TResult }; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: any) => TResult): (obj: any) => {[index: Prop]: TResult}; ======= mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: { [index: string]: T }) => TResult, obj: { [index: string]: T }): { [index: string]: TResult }; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: any) => TResult, obj: any): {[index:string]: TResult}; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: { [index: string]: T }) => TResult): (obj: { [index: string]: T }) => { [index: string]: TResult }; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: any) => TResult): (obj: any) => {[index:string]: TResult}; >>>>>>> mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: { [index: Prop]: T }) => TResult, obj: { [index: Prop]: T }): { [index: Prop]: TResult }; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: any) => TResult, obj: any): {[index: Prop]: TResult}; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: { [index: Prop]: T }) => TResult): (obj: { [index: Prop]: T }) => { [index: Prop]: TResult }; mapObjIndexed<T, TResult>(fn: (value: T, key: string, obj?: any) => TResult): (obj: any) => {[index: Prop]: TResult}; <<<<<<< ======= partition<T,U>(fn: (a:any) => boolean, obj: T & U) : [T,U]; >>>>>>> partition<T,U>(fn: (a:any) => boolean, obj: T & U) : [T,U];
<<<<<<< import { BigNumber } from "../../utils/bignumber"; ======= import { BigNumber } from "../../utils/bignumber"; >>>>>>> import { BigNumber } from "../../utils/bignumber"; <<<<<<< import { CollateralizedSimpleInterestLoanOrder } from "../adapters/collateralized_simple_interest_loan_adapter"; ======= >>>>>>> import { CollateralizedSimpleInterestLoanOrder } from "../adapters/collateralized_simple_interest_loan_adapter"; <<<<<<< export interface DebtOrderParams { principal: TokenAmount; collateral: TokenAmount; interestRate: InterestRate; term: Term; debtorAddress: string; } ======= export interface FillParameters { creditorAddress: string; } import { BLOCK_TIME_ESTIMATE_SECONDS } from "../../utils/constants"; >>>>>>> export interface DebtOrderParams { principal: TokenAmount; collateral: TokenAmount; interestRate: InterestRate; term: Term; debtorAddress: string; } export interface FillParameters { creditorAddress: string; } import { BLOCK_TIME_ESTIMATE_SECONDS } from "../../utils/constants";
<<<<<<< export interface OwnerOfScenario extends Scenario { shouldTransferTo?: string; } ======= export interface TransferFromScenario extends Scenario { from: string; to: string; tokenID: BigNumber; data?: string; options?: TxData; } >>>>>>> export interface OwnerOfScenario extends Scenario { shouldTransferTo?: string; } export interface TransferFromScenario extends Scenario { from: string; to: string; tokenID: BigNumber; data?: string; options?: TxData; }
<<<<<<< ======= // External import * as Web3 from "web3"; import { BigNumber } from "utils/bignumber"; // Types >>>>>>> // Types
<<<<<<< ======= import * as moment from "moment"; >>>>>>> import * as moment from "moment"; <<<<<<< export interface DebtOrderParams { principal: TokenAmount; collateral: TokenAmount; interestRate: InterestRate; term: Term; debtorAddress: string; } ======= import { BLOCK_TIME_ESTIMATE_SECONDS } from "../../utils/constants"; /** * A list of options for specifying units of duration, in singular and plural forms, * ranging from hours as the smallest value to years as the largest. */ export type DurationUnit = | "hour" | "hours" | "day" | "days" | "month" | "months" | "year" | "years"; >>>>>>> export interface DebtOrderParams { principal: TokenAmount; collateral: TokenAmount; interestRate: InterestRate; term: Term; debtorAddress: string; } import { BLOCK_TIME_ESTIMATE_SECONDS } from "../../utils/constants"; /** * A list of options for specifying units of duration, in singular and plural forms, * ranging from hours as the smallest value to years as the largest. */ export type DurationUnit = | "hour" | "hours" | "day" | "days" | "month" | "months" | "year" | "years";
<<<<<<< window.setTimeout(() => { if (!this.hasEventListener(IOErrorEvent.IO_ERROR)) { $warn(1011, url); ======= let self = this; window.setTimeout(function (): void { if (!self.hasEventListener(IOErrorEvent.IO_ERROR)) { egret.warn(1011, url); >>>>>>> window.setTimeout(() => { if (!this.hasEventListener(IOErrorEvent.IO_ERROR)) { egret.warn(1011, url);
<<<<<<< ======= //Check path, determine its type and get all the possible steps using getFileSteps() function getAllPathSteps(stepsPath): Step[] { let f = fs.lstatSync(stepsPath); if (f.isFile()) { return getFileSteps(stepsPath); } else if (f.isDirectory()) { let res = []; fs.readdirSync(stepsPath).forEach(val => { let filePath = stepsPath + '/' + val; if (fs.lstatSync(filePath).isFile() && filePath.match(/\.js/)) { res = res.concat(getFileSteps(filePath)); } }); return res; } else { throw new Error(stepsPath + 'is not a valid path'); } } //Add 'file://' for the non-windows OS's and file:/// for windows function getOSPath(path) { if (/win/.test(require('process').platform)) { path = 'file:///' + path; } else { path = 'file://' + path; } return path; } >>>>>>> //Add 'file://' for the non-windows OS's and file:/// for windows function getOSPath(path) { if (/win/.test(require('process').platform)) { path = 'file:///' + path; } else { path = 'file://' + path; } return path; } <<<<<<< if (line.search(new RegExp('(Given|When|Then).*' + regExpStart + '.+' + regExpEnd)) !== -1) { //Get the '//' match let match = line.match(new RegExp(regExpStart + '(.+)' + regExpEnd)); //Get matched text, remove start and finish slashes let matchText = match[1]; ======= if (line.search(/(Given|When|Then).*\/.*\//) !== -1) { //Get the '//' match let match = line.match(/\/.*\//); //Get matched text, remove start and finish slashes let matchText = match[0].replace(/^\/|\/$/g, ''); >>>>>>> if (line.search(new RegExp('(Given|When|Then).*' + regExpStart + '.+' + regExpEnd)) !== -1) { //Get the '//' match let match = line.match(new RegExp(regExpStart + '(.+)' + regExpEnd)); //Get matched text, remove start and finish slashes let matchText = match[1];
<<<<<<< import { parseShops, Shop } from '@server/world/config/shops'; ======= import Quadtree from 'quadtree-lib'; import { timer } from 'rxjs'; import { Mob } from '@server/world/mob/mob'; export interface QuadtreeKey { x: number; y: number; mob: Mob; } >>>>>>> import { parseShops, Shop } from '@server/world/config/shops'; import Quadtree from 'quadtree-lib'; import { timer } from 'rxjs'; import { Mob } from '@server/world/mob/mob'; export interface QuadtreeKey { x: number; y: number; mob: Mob; } <<<<<<< public readonly shops: Shop[]; ======= public readonly playerTree: Quadtree<any>; public readonly npcTree: Quadtree<any>; >>>>>>> public readonly shops: Shop[]; public readonly playerTree: Quadtree<any>; public readonly npcTree: Quadtree<any>; <<<<<<< this.shops = parseShops(); ======= this.playerTree = new Quadtree<any>({ width: 10000, height: 10000 }); this.npcTree = new Quadtree<any>({ width: 10000, height: 10000 }); >>>>>>> this.shops = parseShops(); this.playerTree = new Quadtree<any>({ width: 10000, height: 10000 }); this.npcTree = new Quadtree<any>({ width: 10000, height: 10000 });
<<<<<<< public clone(): Position { return new Position(this.x, this.y, this.level); } public withinInteractionDistance(landscapeObject: LandscapeObject): boolean { const definition = gameCache.landscapeObjectDefinitions.get(landscapeObject.objectId); const occupantX = landscapeObject.x; const occupantY = landscapeObject.y; ======= public withinInteractionDistance(locationObject: LocationObject): boolean { const definition = cache.locationObjectDefinitions.get(locationObject.objectId); const occupantX = locationObject.x; const occupantY = locationObject.y; >>>>>>> public clone(): Position { return new Position(this.x, this.y, this.level); } public withinInteractionDistance(locationObject: LocationObject): boolean { const definition = cache.locationObjectDefinitions.get(locationObject.objectId); const occupantX = locationObject.x; const occupantY = locationObject.y;
<<<<<<< interface MenuContents { levelName: string; opened: boolean; arrows: string[]; subLevel: any[]; } ======= import { Result } from 'axe-core'; export interface MenuContents { levelName: string, opened: boolean, nested: boolean, arrows: string[], subLevel: any[], } >>>>>>> import { Result } from 'axe-core'; export interface MenuContents { levelName: string; opened: boolean; nested: boolean; arrows: string[]; subLevel: any[]; } <<<<<<< create(levelName: string, subLevel: any[], opened?: boolean): MenuContents; stringify(levelObj: any): string; ======= askMenu(results: Result[], level?:string): string[]; processLevel(levelName: string, subLevel:[], opened?: boolean, nested?: boolean): MenuContents; stringify(levelObj: any, nested: boolean): string; >>>>>>> askMenu(results: Result[], level?: string): string[]; processLevel(levelName: string, subLevel: [], opened?: boolean, nested?: boolean): MenuContents; stringify(levelObj: any, nested: boolean): string; <<<<<<< create: (levelName, subLevel, opened = false) => { ======= askMenu: (results, targetLevel) => { // sort issues into common occurances i.e. { critical: [resultItem1, resultItem2], severe: [resultItem3]} const sorted = results.reduce((acc: any, cur: any) => { if (acc[cur.impact]) acc[cur.impact].push(cur); else acc[cur.impact] = [cur]; return acc; }, {}); // process sorted issues into menu form const processed:any = []; Object.keys(sorted).forEach((issueLevel: string) => { if (issueLevel === targetLevel) { processed.push(menu.processLevel(issueLevel, sorted[issueLevel], true)); sorted[issueLevel].forEach((issue: any) => { processed.push(menu.processLevel(issue, issue.nodes, false, true)); }); } else processed.push(menu.processLevel(issueLevel, sorted[issueLevel])); }); // compile an array of stringified menu options const options = processed.map((option: MenuContents) => menu.stringify(option, option.nested)); return (options); }, processLevel: (levelName, subLevel, opened = false, nested = false) => { >>>>>>> askMenu: (results, targetLevel) => { // sort issues into common occurances i.e. { critical: [resultItem1, resultItem2], severe: [resultItem3]} const sorted = results.reduce((acc: any, cur: any) => { if (acc[cur.impact]) acc[cur.impact].push(cur); else acc[cur.impact] = [cur]; return acc; }, {}); // process sorted issues into menu form const processed: any = []; Object.keys(sorted).forEach((issueLevel: string) => { if (issueLevel === targetLevel) { processed.push(menu.processLevel(issueLevel, sorted[issueLevel], true)); sorted[issueLevel].forEach((issue: any) => { processed.push(menu.processLevel(issue, issue.nodes, false, true)); }); } else processed.push(menu.processLevel(issueLevel, sorted[issueLevel])); }); // compile an array of stringified menu options const options = processed.map((option: MenuContents) => menu.stringify(option, option.nested)); return options; }, processLevel: (levelName, subLevel, opened = false, nested = false) => { <<<<<<< levelName, opened, ======= levelName, opened, nested, >>>>>>> levelName, opened, nested, <<<<<<< stringify: levelObj => { ======= stringify: (levelObj, nested) => { >>>>>>> stringify: (levelObj, nested) => {
<<<<<<< koShowPropertyGrid = ko.observable(true); koShowCategoriesInPropertyGrid = ko.observable(false); koShowToolbox = ko.observable(true); ======= koShowPropertyGrid = ko.observable<ContainerLocation>(true); koShowToolbox = ko.observable<ContainerLocation>(true); >>>>>>> koShowPropertyGrid = ko.observable<ContainerLocation>(true); koShowToolbox = ko.observable<ContainerLocation>(true); koShowCategoriesInPropertyGrid = ko.observable(false); <<<<<<< public set showPropertyGrid(value: boolean) { if (this.showPropertyGrid == value) return; if (value) { this.setNewObjToPropertyGrid(this.koSelectedObject()); } this.koShowPropertyGrid(value); this.koHideAdvancedSettings(!value); ======= /** * Set it to false to hide the pages toolbox on the top. */ public get showPagesToolbox() { return this.koShowPagesToolbox() !== false && this.koShowPagesToolbox() !== "none"; } public set showPagesToolbox(value: ContainerLocation) { this.koShowPagesToolbox(value); >>>>>>> /** * Set it to false to hide the pages toolbox on the top. */ public get showPagesToolbox() { return this.koShowPagesToolbox() !== false && this.koShowPagesToolbox() !== "none"; } public set showPagesToolbox(value: ContainerLocation) { this.koShowPagesToolbox(value);
<<<<<<< import { FilterListService } from './filter-list-service/index'; import { CacheCustomService } from '../../services/index'; import { instance, mock, when, anything } from 'ts-mockito/lib/ts-mockito'; import { DebugElement } from '@angular/core/core'; ======= import { data } from './filter-list-service/filter-list.mock'; import { CacheCustomService } from '../../services/cache/cache-custom.service'; import { FilterListService, FilterListMockService } from './filter-list-service'; import { InstanceService } from '../../services/instance.service'; >>>>>>> import { FilterListService } from './filter-list-service/index'; import { CacheCustomService } from '../../services/index'; import { instance, mock, when, anything } from 'ts-mockito/lib/ts-mockito';
<<<<<<< ======= import { ProductList } from '../../services/products/products.mock'; >>>>>>> <<<<<<< import { environment } from '../../../environments/environment'; import { JwtService, GlobalState, CacheCustomService } from '../../services'; ======= import { environment } from '../../../environments/environment'; import { JwtService } from '../../services/jwt.service'; import { GlobalState } from '../../services/global.state'; import { CacheCustomService } from '../../services/cache/cache-custom.service'; >>>>>>> import { environment } from '../../../environments/environment'; import { JwtService, GlobalState, CacheCustomService } from '../../services'; <<<<<<< import { DisableIconDirective } from '../../directives/disable-icon.directive'; ======= import { DisableIconDirective } from '../../directives/disable-icon.directive'; import { mock, instance } from 'ts-mockito'; import { LocalizeRouterService } from '../../services/routes-parser-locale-currency/localize-router.service'; >>>>>>> import { DisableIconDirective } from '../../directives/disable-icon.directive'; import { mock, instance } from 'ts-mockito'; import { LocalizeRouterService } from '../../services/routes-parser-locale-currency/localize-router.service';
<<<<<<< import { MiniCartComponent } from './mini-cart/mini-cart.component'; import { SearchBoxComponent } from './search-box/search-box.component'; import { CompareDetailsComponent } from './product-compare/compare-details.component'; import { WishListComponent } from './wish-list/wish-list.component'; ======= import { MiniCartComponent } from './miniCart/miniCart.component'; import { SearchBoxComponent } from './searchBox/searchBox.component'; import { WishListComponent } from './wishList/wishList.component'; >>>>>>> import { MiniCartComponent } from './mini-cart/mini-cart.component'; import { SearchBoxComponent } from './search-box/search-box.component'; import { WishListComponent } from './wish-list/wish-list.component'; <<<<<<< import { LanguageSwitchComponent } from './language-switch/language-switch.component'; import { HeaderNavigationComponent } from './header-navigation/header-navigation.component'; import { LoginStatusComponent } from './login-status/login-status.component'; import { AccountLoginApiService, AccountLoginMockService, AccountLoginService } from '../../../pages/account-login/account-login-service'; import { SharedModule } from '../../shared-modules/shared.module'; ======= import { LanguageSwitchComponent } from './languageSwitch/languageSwitch.component'; import { HeaderNavigationComponent } from './headerNavigation/headerNavigation.component'; import { LoginStatusComponent } from './loginStatus/loginStatus.component'; import { AccountLoginApiService, AccountLoginMockService, AccountLoginService } from '../../../pages/accountLogin/accountLoginService'; import { SharedModule } from '../../sharedModules/shared.module'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { CollapseModule } from 'ngx-bootstrap/collapse'; >>>>>>> import { LanguageSwitchComponent } from './language-switch/language-switch.component'; import { HeaderNavigationComponent } from './header-navigation/header-navigation.component'; import { LoginStatusComponent } from './login-status/login-status.component'; import { AccountLoginApiService, AccountLoginMockService, AccountLoginService } from '../../../pages/account-login/account-login-service'; import { SharedModule } from '../../shared-modules/shared.module'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { CollapseModule } from 'ngx-bootstrap/collapse';
<<<<<<< import { SharedModule } from 'app/modules/shared.module'; ======= import { userData } from '../../services/account-login/account-login.mock'; import { SharedModule } from '../../modules/shared.module'; >>>>>>> import { SharedModule } from '../../modules/shared.module'; <<<<<<< let fixture: ComponentFixture<AccountLoginComponent>; let component: AccountLoginComponent; let element: HTMLElement; let debugEl: DebugElement; const userData = { 'type': 'PrivateCustomer', 'customerNo': 'Patricia', 'preferredInvoiceToAddress': { 'type': 'Address', 'urn': 'urn:address:customer:vTwKAB2YqvEAAAFb8BMYJJBT:I2MKAB2YsVUAAAFb9RMYJJBT', 'id': 'I2MKAB2YsVUAAAFb9RMYJJBT', 'addressName': 'customeraddr-ABCDEFGPRMuMCscyXgSRVU', 'title': 'Ms.', 'firstName': 'Patricia', 'lastName': 'Miller', 'addressLine1': 'Potsdamer Str. 20', 'postalCode': '14483', 'phoneHome': '049364112677', 'country': 'Germany', 'countryCode': 'DE', 'city': 'Berlin', 'usage': [ true, true ], 'invoiceToAddress': true, 'shipFromAddress': false, 'serviceToAddress': false, 'installToAddress': false, 'shipToAddress': true, 'street': 'Potsdamer Str. 20' }, 'preferredShipToAddress': { 'type': 'Address', 'urn': 'urn:address:customer:vTwKAB2YqvEAAAFb8BMYJJBT:I2MKAB2YsVUAAAFb9RMYJJBT', 'id': '.uUKAB2YsVEAAAFb9RMYJJBT', 'addressName': 'customeraddr-YXEwLKSprCWPRMuMCscyXgSRVU', 'title': 'Ms.', 'firstName': 'Patricia', 'lastName': 'Miller', 'addressLine1': 'Berliner Str. 20', 'postalCode': '14482', 'phoneHome': '049364112677', 'country': 'Germany', 'countryCode': 'DE', 'city': 'Potsdam', 'usage': [ true, true ], 'invoiceToAddress': true, 'shipFromAddress': false, 'serviceToAddress': false, 'installToAddress': false, 'shipToAddress': true, 'street': 'Berliner Str. 20' }, 'title': '', 'firstName': 'Patricia', 'lastName': 'Miller', 'phoneHome': '', 'phoneBusiness': '', 'phoneMobile': '', 'fax': '', 'email': 'patricia@test.intershop.de', 'hasRole': true }; class MockAccountLoginService { singinUser(userDetails) { if (userDetails.userName === 'intershop@123.com' && userDetails.password === '123456') { return Observable.of(userData); } else { return Observable.of('Incorrect Credentials'); } } ======= let fixture: ComponentFixture<AccountLoginComponent>; let component: AccountLoginComponent; let element: HTMLElement; let debugEl: DebugElement; class MockAccountLoginService { singinUser(userDetails) { if (userDetails.userName === 'intershop@123.com' && userDetails.password === '123456') { return Observable.of(userData); } else { return Observable.of('Incorrect Credentials'); } >>>>>>> let fixture: ComponentFixture<AccountLoginComponent>; let component: AccountLoginComponent; let element: HTMLElement; let debugEl: DebugElement; const userData = { 'type': 'PrivateCustomer', 'customerNo': 'Patricia', 'preferredInvoiceToAddress': { 'type': 'Address', 'urn': 'urn:address:customer:vTwKAB2YqvEAAAFb8BMYJJBT:I2MKAB2YsVUAAAFb9RMYJJBT', 'id': 'I2MKAB2YsVUAAAFb9RMYJJBT', 'addressName': 'customeraddr-ABCDEFGPRMuMCscyXgSRVU', 'title': 'Ms.', 'firstName': 'Patricia', 'lastName': 'Miller', 'addressLine1': 'Potsdamer Str. 20', 'postalCode': '14483', 'phoneHome': '049364112677', 'country': 'Germany', 'countryCode': 'DE', 'city': 'Berlin', 'usage': [ true, true ], 'invoiceToAddress': true, 'shipFromAddress': false, 'serviceToAddress': false, 'installToAddress': false, 'shipToAddress': true, 'street': 'Potsdamer Str. 20' }, 'preferredShipToAddress': { 'type': 'Address', 'urn': 'urn:address:customer:vTwKAB2YqvEAAAFb8BMYJJBT:I2MKAB2YsVUAAAFb9RMYJJBT', 'id': '.uUKAB2YsVEAAAFb9RMYJJBT', 'addressName': 'customeraddr-YXEwLKSprCWPRMuMCscyXgSRVU', 'title': 'Ms.', 'firstName': 'Patricia', 'lastName': 'Miller', 'addressLine1': 'Berliner Str. 20', 'postalCode': '14482', 'phoneHome': '049364112677', 'country': 'Germany', 'countryCode': 'DE', 'city': 'Potsdam', 'usage': [ true, true ], 'invoiceToAddress': true, 'shipFromAddress': false, 'serviceToAddress': false, 'installToAddress': false, 'shipToAddress': true, 'street': 'Berliner Str. 20' }, 'title': '', 'firstName': 'Patricia', 'lastName': 'Miller', 'phoneHome': '', 'phoneBusiness': '', 'phoneMobile': '', 'fax': '', 'email': 'patricia@test.intershop.de', 'hasRole': true }; class MockAccountLoginService { singinUser(userDetails) { if (userDetails.userName === 'intershop@123.com' && userDetails.password === '123456') { return Observable.of(userData); } else { return Observable.of('Incorrect Credentials'); }
<<<<<<< ======= import { InstanceService } from '../../services/instance.service'; import { environment } from '../../../environments/environment'; import { ProductListMockService } from './products.service.mock'; import { ProductListApiService } from './products.service.api'; >>>>>>>
<<<<<<< ======= import { TestBed, inject } from '@angular/core/testing'; import { environment } from '../../../environments/environment'; >>>>>>> <<<<<<< import { ApiService } from '../'; import { mock, instance, when, anything } from 'ts-mockito'; import { Observable } from 'rxjs/Rx'; ======= import { InstanceService } from '../instance.service'; import { CategoryMockService } from './category.service.mock'; >>>>>>> import { ApiService } from '../'; import { mock, instance, when, anything } from 'ts-mockito'; import { Observable } from 'rxjs/Rx';
<<<<<<< self.onOkClick = function() {self.apply(); if(!self.koHasError()) jQuery(self.modalNameTarget).modal("hide");; }; self.onResetClick = function () { self.reset(); }; self.koAfterRender = function(el, con) { return self.afterRender(el, con); }; ======= self.onOkClick = function() { self.apply(); if(!self.koHasError()) self.onHideModal() }; self.onResetClick = function () { self.reset(); self.onHideModal() }; self.onShowModal = function () { var modal = new RModal(document.querySelector(self.modalNameTarget), { closeTimeout: 100, dialogOpenClass: 'animated fadeInDown', focus: false }); modal.open(); document.addEventListener('keydown', function(ev) { modal.keydown(ev); }, false); self.onHideModal = function() {modal.close()}; }; >>>>>>> self.onOkClick = function() { self.apply(); if(!self.koHasError()) self.onHideModal() }; self.onResetClick = function () { self.reset(); self.onHideModal() }; self.onShowModal = function () { var modal = new RModal(document.querySelector(self.modalNameTarget), { closeTimeout: 100, dialogOpenClass: 'animated fadeInDown', focus: false }); modal.open(); document.addEventListener('keydown', function(ev) { modal.keydown(ev); }, false); self.onHideModal = function() {modal.close()}; }; self.koAfterRender = function(el, con) { return self.afterRender(el, con); };
<<<<<<< // import { CategoriesService } from '../../services/categories/categories.service'; ======= import { CategoryPageComponent } from '../../pages/category-page/category-page.component'; import { FamilyPageComponent } from '../../pages/family-page/family-page.component'; import { CategoriesService } from '../../services/categories/categories.service'; >>>>>>> import { CategoryPageComponent } from '../../pages/category-page/category-page.component'; import { FamilyPageComponent } from '../../pages/family-page/family-page.component'; import { CategoriesService } from '../../services/categories/categories.service'; <<<<<<< isFamilyPage = true; constructor( private route: ActivatedRoute, // private categoriesService: CategoriesService ) {} ======= @ViewChild('categoryFamilyContainer', { read: ViewContainerRef }) categoryFamilyContainer: ViewContainerRef; constructor(private route: ActivatedRoute, private categoriesService: CategoriesService, private cfResolver: ComponentFactoryResolver) { } >>>>>>> @ViewChild('categoryFamilyContainer', { read: ViewContainerRef }) categoryFamilyContainer: ViewContainerRef; constructor(private route: ActivatedRoute, private categoriesService: CategoriesService, private cfResolver: ComponentFactoryResolver) { } <<<<<<< console.log(this.route); console.log(params); // TODO: the current category information needs to be gotten from the routing url context // there cannot be any relying on some interaction state /* if (this.categoriesService.current.hasOnlineSubCategories) { this.isFamilyPage = false; } else { this.isFamilyPage = true; } */ ======= this.categoriesService.getCategory('categories' + this.route.snapshot['_routerState'].url.split('/category')[1]).subscribe(data => { this.categoriesService.setCurrentCategory(data); let factory: any; this.categoryFamilyContainer.clear(); if (data.hasOnlineSubCategories) { factory = this.cfResolver.resolveComponentFactory(CategoryPageComponent); } else { factory = this.cfResolver.resolveComponentFactory(FamilyPageComponent); } this.categoryFamilyContainer.createComponent(factory); }); >>>>>>> this.categoriesService.getCategory('categories' + this.route.snapshot['_routerState'].url.split('/category')[1]).subscribe(data => { let factory: any; this.categoryFamilyContainer.clear(); if (data.hasOnlineSubCategories) { factory = this.cfResolver.resolveComponentFactory(CategoryPageComponent); } else { factory = this.cfResolver.resolveComponentFactory(FamilyPageComponent); } this.categoryFamilyContainer.createComponent(factory); });
<<<<<<< import { AuthGuard } from '../services/auth-guard.service' import { LocalizeRouterModule } from '../services/routes-parser-locale-currency/localize-router.module'; ======= import { AuthGuard } from '../services/auth-guard.service'; import { BreadcrumbService } from '../components/breadcrumb/breadcrumb.service'; >>>>>>> import { AuthGuard } from '../services/auth-guard.service'; import { LocalizeRouterModule } from '../services/routes-parser-locale-currency/localize-router.module'; import { BreadcrumbService } from '../components/breadcrumb/breadcrumb.service'; <<<<<<< { path: 'category', loadChildren: 'app/pages/category-page/category-page.module#CategoryPageModule' }, { path: 'family', loadChildren: 'app/pages/family-page/family-page.module#FamilyPageModule' }, ======= { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', loadChildren: 'app/pages/home-page/home-page.module#HomePageModule', data: { className: 'homepage' } }, { path: 'category/:category-name', loadChildren: 'app/pages/category-page/category-page.module#CategoryPageModule' }, >>>>>>> { path: 'family', loadChildren: 'app/pages/family-page/family-page.module#FamilyPageModule' }, { path: 'category/:category-name', loadChildren: 'app/pages/category-page/category-page.module#CategoryPageModule' },
<<<<<<< import { CompareDetailsComponent } from './shared/components/header/product-compare/compare-details.component'; ======= >>>>>>>
<<<<<<< ======= import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { CarouselModule } from 'ngx-bootstrap/carousel'; import { CollapseModule } from 'ngx-bootstrap/collapse'; import { ModalModule } from 'ngx-bootstrap/modal'; import { PopoverModule } from 'ngx-bootstrap/popover'; import { translateFactory } from '../shared/lang-switcher/custom-translate-loader'; import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { AuthInterceptor } from './shared/http-interceptors/auth-interceptor'; >>>>>>> import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { AuthInterceptor } from './shared/http-interceptors/auth-interceptor';
<<<<<<< ] ======= { provide: Router, useFactory: () => instance(mock(Router)) }, ], declarations: [LanguageSwitchComponent] >>>>>>> ], declarations: [LanguageSwitchComponent]
<<<<<<< import { ComponentFixture } from '@angular/core/testing'; import { Router } from '@angular/router'; ======= >>>>>>> import { ComponentFixture } from '@angular/core/testing';
<<<<<<< import { Component, OnInit } from '@angular/core'; import { environment } from '../../../environments/environment'; import { Category } from '../../services/categories/categories.model'; import { CategoriesService } from '../../services/categories/categories.service'; import { GlobalState } from '../../services/global.state'; import { WishListService } from '../../services/wishlists/wishlists.service'; ======= import { Component } from '@angular/core'; import { CartStatusService } from '../../services/cart-status/cart-status.service'; >>>>>>> import { Component, OnInit } from '@angular/core'; import { environment } from '../../../environments/environment'; import { CartStatusService } from '../../services/cart-status/cart-status.service'; import { Category } from '../../services/categories/categories.model'; import { CategoriesService } from '../../services/categories/categories.service';
<<<<<<< trigger: 'hover', placement: 'top', content: 'Set streaming mode.', ======= trigger: 'click hover', placement: 'right', content: 'Shows an interactive stream of results, useful when your data is changing quickly.', >>>>>>> trigger: 'hover', placement: 'top', content: 'Shows an interactive stream of results, useful when your data is changing quickly.', <<<<<<< trigger: 'hover', placement: 'top', content: 'Set historic mode.', ======= trigger: 'click hover', placement: 'right', content: 'Shows historical results, useful when your data is not changing quickly.', >>>>>>> trigger: 'hover', placement: 'right', content: 'Shows historical results, useful when your data is not changing quickly.',
<<<<<<< const TestSchema = new Schema<ITest>({ foo: { type: String, required: true }, ======= const TestSchema = new Schema({ foo: { type: String, required: true } >>>>>>> const TestSchema = new Schema<ITest>({ foo: { type: String, required: true }; <<<<<<< const TestSchema = new Schema<ITest & Document>({ foo: { type: String, required: true }, ======= const TestSchema = new Schema({ foo: { type: String, required: true } >>>>>>> const TestSchema = new Schema<ITest & Document>({ foo: { type: String, required: true }; <<<<<<< name: String; myMethod(): number; ======= name: string; >>>>>>> name: string; myMethod(): number;
<<<<<<< create<DocContents = T | DocumentDefinition<T>>(docs: CreateDoc<DocContents>[], options?: SaveOptions): Promise<T[]>; create<DocContents = T | DocumentDefinition<T>>(doc: CreateDoc<DocContents>): Promise<T>; create<DocContents = T | DocumentDefinition<T>>(...docs: CreateDoc<DocContents>[]): Promise<T[]>; create<DocContents = T | DocumentDefinition<T>>(docs: CreateDoc<DocContents>[], callback: (err: CallbackError, docs: T[]) => void): void; create<DocContents = T | DocumentDefinition<T>>(doc: CreateDoc<DocContents>, callback: (err: CallbackError, doc: T) => void): void; ======= create(doc: T | DocumentDefinition<T>): Promise<T>; create(docs: (T | DocumentDefinition<T>)[], options?: SaveOptions): Promise<T[]>; create(docs: (T | DocumentDefinition<T>)[], callback: (err: CallbackError, docs: T[]) => void): void; create(doc: T | DocumentDefinition<T>, callback: (err: CallbackError, doc: T) => void): void; create<DocContents = T | DocumentDefinition<T>>(docs: DocContents[], options?: SaveOptions): Promise<T[]>; create<DocContents = T | DocumentDefinition<T>>(doc: DocContents): Promise<T>; create<DocContents = T | DocumentDefinition<T>>(...docs: DocContents[]): Promise<T[]>; create<DocContents = T | DocumentDefinition<T>>(docs: DocContents[], callback: (err: CallbackError, docs: T[]) => void): void; create<DocContents = T | DocumentDefinition<T>>(doc: DocContents, callback: (err: CallbackError, doc: T) => void): void; >>>>>>> create(doc: T | DocumentDefinition<T>): Promise<T>; create(docs: (T | DocumentDefinition<T>)[], options?: SaveOptions): Promise<T[]>; create(docs: (T | DocumentDefinition<T>)[], callback: (err: CallbackError, docs: T[]) => void): void; create(doc: T | DocumentDefinition<T>, callback: (err: CallbackError, doc: T) => void): void; create<DocContents = T | DocumentDefinition<T>>(docs: DocContents[], options?: SaveOptions): Promise<T[]>; create<DocContents = T | DocumentDefinition<T>>(doc: DocContents): Promise<T>; create<DocContents = T | DocumentDefinition<T>>(...docs: DocContents[]): Promise<T[]>; create<DocContents = T | DocumentDefinition<T>>(docs: DocContents[], callback: (err: CallbackError, docs: T[]) => void): void; create<DocContents = T | DocumentDefinition<T>>(doc: DocContents, callback: (err: CallbackError, doc: T) => void): void; <<<<<<< deleteMany(filter?: any, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<any, T, TQueryHelpers>; ======= deleteMany(filter?: FilterQuery<T>, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<mongodb.DeleteWriteOpResultObject['result'] & { deletedCount?: number }, T>; >>>>>>> deleteMany(filter?: FilterQuery<T>, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<mongodb.DeleteWriteOpResultObject['result'] & { deletedCount?: number }, T, TQueryHelpers>; <<<<<<< deleteOne(filter?: any, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<any, T, TQueryHelpers>; ======= deleteOne(filter?: FilterQuery<T>, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<mongodb.DeleteWriteOpResultObject['result'] & { deletedCount?: number }, T>; >>>>>>> deleteOne(filter?: FilterQuery<T>, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<mongodb.DeleteWriteOpResultObject['result'] & { deletedCount?: number }, T, TQueryHelpers>; <<<<<<< update(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<any, T, TQueryHelpers>; ======= update(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<mongodb.WriteOpResult['result'], T>; >>>>>>> update(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<mongodb.WriteOpResult['result'], T, TQueryHelpers>; <<<<<<< updateMany(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<any, T, TQueryHelpers>; ======= updateMany(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<mongodb.UpdateWriteOpResult['result'], T>; >>>>>>> updateMany(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<mongodb.UpdateWriteOpResult['result'], T, TQueryHelpers>; <<<<<<< updateOne(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<any, T, TQueryHelpers>; ======= updateOne(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<mongodb.UpdateWriteOpResult['result'], T>; >>>>>>> updateOne(filter?: FilterQuery<T>, update?: UpdateQuery<T>, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query<mongodb.UpdateWriteOpResult['result'], T, TQueryHelpers>;
<<<<<<< import * as assert from "assert"; import { Constants } from "../../common"; import { IHeaders } from "../../queryExecutionContext/IHeaders"; import { SessionContainer } from "../../session/sessionContainer"; import { SessionContext } from "../../session/SessionContext"; ======= import assert from "assert"; import { ResourceId } from "../../common"; import { SessionContainer } from "../../sessionContainer"; >>>>>>> import assert from "assert"; import { Constants } from "../../common"; import { IHeaders } from "../../queryExecutionContext/IHeaders"; import { SessionContainer } from "../../session/sessionContainer"; import { SessionContext } from "../../session/SessionContext";
<<<<<<< ======= import {Config} from '../../../node_modules/protractor'; import {IAuthenticationService} from '../../contracts/authentication/IAuthenticationService'; import {AuthenticationStateEvent, NotificationType} from '../../contracts/index'; >>>>>>> <<<<<<< public config: typeof environment = environment; public isLoggedInToProcessEngine: boolean; @bindable() public baseRoute: string; ======= >>>>>>> public config: typeof environment = environment; public isLoggedInToProcessEngine: boolean; @bindable() public baseRoute: string;
<<<<<<< private _parseDeepLinkingUrl(url: string): string { const customProtocolPrefix: string = 'bpmn-studio://'; const urlFragment: string = url.substring(customProtocolPrefix.length); return urlFragment; } ======= >>>>>>> private _parseDeepLinkingUrl(url: string): string { const customProtocolPrefix: string = 'bpmn-studio://'; const urlFragment: string = url.substring(customProtocolPrefix.length); return urlFragment; } <<<<<<< const ipcRenderer: any = (<any> window).nodeRequire('electron').ipcRenderer; ======= const ipcRenderer: any = (window as any).nodeRequire('electron').ipcRenderer; ipcRenderer.on('deep-linking-request-in-runtime', (event: any, url: string) => { this._processDeepLinkingRequest(url); }); >>>>>>> const ipcRenderer: any = (window as any).nodeRequire('electron').ipcRenderer;
<<<<<<< import environment from './environment'; import {oidcConfig} from './open-id-connect-configuration'; ======= >>>>>>>
<<<<<<< <<<<<<< Updated upstream import {AuthenticationStateEvent, IPagination, IProcessEngineService} from '../../contracts/index'; ======= import {AuthenticationStateEvent} from '../../contracts/index'; >>>>>>> import {Router} from 'aurelia-router'; import {AuthenticationStateEvent} from '../../contracts/index'; <<<<<<< @inject('ProcessEngineService', EventAggregator) ======= import {Router} from 'aurelia-router'; import {AuthenticationStateEvent} from '../../contracts/index'; import environment from '../../environment'; @inject(EventAggregator, 'ConsumerClient', Router) >>>>>>> Stashed changes ======= @inject(EventAggregator, 'ConsumerClient') >>>>>>> @inject(EventAggregator, 'ConsumerClient', Router) <<<<<<< <<<<<<< Updated upstream ======= private consumerClient: ConsumerClient; private router: Router; >>>>>>> Stashed changes ======= private consumerClient: ConsumerClient; >>>>>>> private router: Router; <<<<<<< <<<<<<< Updated upstream constructor(processEngineService: IProcessEngineService, eventAggregator: EventAggregator) { this.processEngineService = processEngineService; ======= constructor(eventAggregator: EventAggregator, consumerClient: ConsumerClient) { >>>>>>> constructor(eventAggregator: EventAggregator, consumerClient: ConsumerClient, router: Router) { <<<<<<< ======= constructor(eventAggregator: EventAggregator, consumerClient: ConsumerClient, router: Router) { this.eventAggregator = eventAggregator; this.consumerClient = consumerClient; this.router = router; this.consumerClient.once('renderUserTask', (userTaskConfig: IUserTaskEntity) => { this.router.navigate(`/task/${userTaskConfig.id}/dynamic-ui`); }); >>>>>>> Stashed changes ======= this.consumerClient = consumerClient; >>>>>>> this.consumerClient = consumerClient; this.router = router; this.consumerClient.once('renderUserTask', (userTaskConfig: IUserTaskEntity) => { this.router.navigate(`/task/${userTaskConfig.id}/dynamic-ui`); });
<<<<<<< public deleteProcessDef(processId: string): Promise<void> { const url: string = `${environment.processengine.routes.processes}/${processId}`; return this.http .fetch(url, { method: 'delete', }) .then((response: Response) => { return response.json(); }).then((result: any) => { const responseFailed: boolean = result.error || !result.result; if (responseFailed) { throw new Error(result.error); } }); ======= public async deleteProcessDef(processId: string): Promise<void> { const url: string = environment.processengine.routes.processes + '/' + processId; const response: Response = await this.http.fetch(url, { method: 'delete' }); return throwOnErrorResponse<void>(response); >>>>>>> public async deleteProcessDef(processId: string): Promise<void> { const url: string = `${environment.processengine.routes.processes}/${processId}`; const response: Response = await this.http.fetch(url, { method: 'delete' }); return throwOnErrorResponse<void>(response); <<<<<<< const url: string = `${environment.processengine.routes.processes}/${processDef.id}/updateBpmn`; return this.http .fetch(url, options) .then((response: Response) => { return response.json(); }); ======= const url: string = environment.processengine.routes.processes + '/' + processDef.id + '/updateBpmn'; const response: Response = await this.http.fetch(url, options); return throwOnErrorResponse<any>(response); >>>>>>> const url: string = `${environment.processengine.routes.processes}/${processDef.id}/updateBpmn`; const response: Response = await this.http.fetch(url, options); return throwOnErrorResponse<any>(response);
<<<<<<< import {AuthenticationStateEvent, IDynamicUiService, IPagination, IProcessEngineService, NotificationType} from '../../contracts/index'; ======= import {Router} from 'aurelia-router'; import * as toastr from 'toastr'; import {AuthenticationStateEvent, IDynamicUiService, IPagination, IProcessEngineService} from '../../contracts/index'; >>>>>>> import {Router} from 'aurelia-router'; import {AuthenticationStateEvent, IDynamicUiService, IPagination, IProcessEngineService, NotificationType} from '../../contracts/index'; <<<<<<< @inject(EventAggregator, 'BpmnStudioClient', 'NotificationService') ======= @inject(EventAggregator, 'BpmnStudioClient', Router) >>>>>>> @inject(EventAggregator, 'BpmnStudioClient', Router, 'NotificationService') <<<<<<< constructor(eventAggregator: EventAggregator, bpmnStudioClient: BpmnStudioClient, notificationService: NotificationService) { ======= constructor(eventAggregator: EventAggregator, bpmnStudioClient: BpmnStudioClient, router: Router) { >>>>>>> constructor(eventAggregator: EventAggregator, bpmnStudioClient: BpmnStudioClient, router: Router, notificationService: NotificationService) { <<<<<<< this.notificationService = notificationService; ======= this.router = router; >>>>>>> this.router = router; this.notificationService = notificationService;
<<<<<<< diagramChange: 'diagram:change', ======= processSolutionPanel: { toggleProcessSolutionExplorer: 'processSolutionPanel:processsolutionexplorer:toggle', }, >>>>>>> diagramChange: 'diagram:change', processSolutionPanel: { toggleProcessSolutionExplorer: 'processSolutionPanel:processsolutionexplorer:toggle', },
<<<<<<< bpmnio: { toggleXMLView: 'processdefdetail:xmlview:toggle', }, diagramChange: 'diagram:change', ======= processSolutionPanel: { toggleProcessSolutionExplorer: 'processSolutionPanel:processsolutionexplorer:toggle', }, >>>>>>> bpmnio: { toggleXMLView: 'processdefdetail:xmlview:toggle', }, diagramChange: 'diagram:change', processSolutionPanel: { toggleProcessSolutionExplorer: 'processSolutionPanel:processsolutionexplorer:toggle', },
<<<<<<< import {BindingEngine, inject} from 'aurelia-framework'; ======= import {inject} from 'aurelia-framework'; import {Router} from 'aurelia-router'; >>>>>>> import {BindingEngine, inject} from 'aurelia-framework'; import {Router} from 'aurelia-router'; <<<<<<< @inject(EventAggregator, 'ConsumerClient', BindingEngine) ======= @inject(EventAggregator, 'ConsumerClient', Router) >>>>>>> @inject(EventAggregator, 'ConsumerClient', BindingEngine, Router) <<<<<<< private bindingEngine: BindingEngine; constructor(eventAggregator: EventAggregator, consumerClient: ConsumerClient, bindingEngine: BindingEngine) { ======= constructor(eventAggregator: EventAggregator, consumerClient: ConsumerClient, router: Router) { >>>>>>> constructor(eventAggregator: EventAggregator, consumerClient: ConsumerClient, bindingEngine: BindingEngine, router: Router) { <<<<<<< this.bindingEngine = bindingEngine; ======= this.router = router; } >>>>>>> this.bindingEngine = bindingEngine; this.router = router;
<<<<<<< const result = await shelljs.exec(`mongorestore --uri ${MONGO_URL} --db erxes ./src/initialData/permission`, { ======= const result = await shelljs.exec(`mongorestore --uri "${MONGO_URL}" --db erxes ./src/permissionData`, { >>>>>>> const result = await shelljs.exec(`mongorestore --uri "${MONGO_URL}" --db erxes ./src/initialData/permission`, {
<<<<<<< const result = await shelljs.exec(`mongorestore --uri ${MONGO_URL} --db erxes ./src/initialData/common`, { silent: true, }); ======= const result = await shelljs.exec(`mongorestore --uri "${MONGO_URL}" --db erxes ./src/initialData`, { silent: true }); >>>>>>> const result = await shelljs.exec(`mongorestore --uri "${MONGO_URL}" --db erxes ./src/initialData/common`, { silent: true, });
<<<<<<< private _outputChannel: vs.OutputChannel; ======= >>>>>>> private _outputChannel: vs.OutputChannel; <<<<<<< traceNode(editor: vs.TextEditor, edit: vs.TextEditorEdit) { if (!this._checkLanguageSupport(editor.document, "Trace TypeScript Syntax Node")) { return; } const selection = editor.selection; const carat = selection.start; const sourceFile = this._getSourceFile(editor.document); const position = ts.getPositionOfLineAndCharacter(sourceFile, carat.line, carat.character); const node = utils.findChildForPosition(sourceFile, position); const nodes: string[] = []; let parent = node; while (parent) { nodes.push(this._printNodeInfo(parent, sourceFile)); parent = parent.parent; } const sb = new utils.StringBuilder(); nodes.reverse().forEach(n => { sb.appendLine(n); }); if (!this._outputChannel) { this._outputChannel = vs.window.createOutputChannel("Syntax Node Trace"); } this._outputChannel.show(); this._outputChannel.appendLine(sb.toString()); } private _printNodeInfo(node: ts.Node, sourceFile: ts.SourceFile) { const sb = new utils.StringBuilder(); sb.appendLine(`${ node.getStart() } to ${ node.getEnd() } --- (${node.kind}) ${ (<any>ts).SyntaxKind[node.kind] }`); const column = sourceFile.getLineAndCharacterOfPosition(node.getStart()).character; for (let i = 0; i < column; i++) { sb.append(" "); } sb.appendLine(node.getText()); return sb.toString(); } ======= >>>>>>> traceNode(editor: vs.TextEditor, edit: vs.TextEditorEdit) { const selection = editor.selection; const caret = selection.start; const sourceFile = this._getSourceFile(editor.document); const position = ts.getPositionOfLineAndCharacter(sourceFile, caret.line, caret.character); const node = utils.findChildForPosition(sourceFile, position); const nodes: string[] = []; let parent = node; while (parent) { nodes.push(this._printNodeInfo(parent, sourceFile)); parent = parent.parent; } const sb = new utils.StringBuilder(); nodes.reverse().forEach(n => { sb.appendLine(n); }); if (!this._outputChannel) { this._outputChannel = vs.window.createOutputChannel("TypeScript Syntax Node Trace"); } this._outputChannel.show(); this._outputChannel.appendLine(sb.toString()); } private _printNodeInfo(node: ts.Node, sourceFile: ts.SourceFile) { const sb = new utils.StringBuilder(); sb.appendLine(`${ node.getStart() } to ${ node.getEnd() } --- (${node.kind}) ${ (<any>ts).SyntaxKind[node.kind] }`); const column = sourceFile.getLineAndCharacterOfPosition(node.getStart()).character; for (let i = 0; i < column; i++) { sb.append(" "); } sb.appendLine(node.getText()); return sb.toString(); }
<<<<<<< export enum FixAllScope { Document = "Document", Project = "Project", Solution = "Solution" } export interface GetFixAllRequest extends FileBasedRequest { Scope: FixAllScope; FixAllFilter?: FixAllItem[]; } export interface RunFixAllRequest extends FileBasedRequest { Scope: FixAllScope; FixAllFilter?: FixAllItem[]; WantsTextChanges: boolean; WantsAllCodeActionOperations: boolean; } ======= export interface QuickInfoRequest extends Request { } export interface QuickInfoResponse { Markdown?: string; } >>>>>>> export enum FixAllScope { Document = "Document", Project = "Project", Solution = "Solution" } export interface GetFixAllRequest extends FileBasedRequest { Scope: FixAllScope; FixAllFilter?: FixAllItem[]; } export interface RunFixAllRequest extends FileBasedRequest { Scope: FixAllScope; FixAllFilter?: FixAllItem[]; WantsTextChanges: boolean; WantsAllCodeActionOperations: boolean; } export interface QuickInfoRequest extends Request { } export interface QuickInfoResponse { Markdown?: string; }
<<<<<<< scheduler = new rx.HistoricalScheduler(0, (x, y) => { return x > y ? 1 : -1; }); observer = new WarningMessageObserver(vscode, () => false, scheduler); warningMessage = undefined; ======= assertionObservable = new Subject<string>(); scheduler = new TestScheduler(assert.deepEqual); scheduler.maxFrames = 9000; observer = new WarningMessageObserver(vscode, scheduler); warningMessages = []; >>>>>>> assertionObservable = new Subject<string>(); scheduler = new TestScheduler(assert.deepEqual); scheduler.maxFrames = 9000; observer = new WarningMessageObserver(vscode, () => false, scheduler); warningMessages = [];
<<<<<<< import { FixAllProvider } from '../features/fixAllProvider'; ======= import { LanguageMiddlewareFeature } from './LanguageMiddlewareFeature'; >>>>>>> import { FixAllProvider } from '../features/fixAllProvider'; import { LanguageMiddlewareFeature } from './LanguageMiddlewareFeature'; <<<<<<< localDisposables.add(vscode.languages.registerCodeActionsProvider(documentSelector, new FixAllProvider(server))); localDisposables.add(reportDiagnostics(server, advisor)); ======= localDisposables.add(reportDiagnostics(server, advisor, languageMiddlewareFeature)); >>>>>>> localDisposables.add(vscode.languages.registerCodeActionsProvider(documentSelector, new FixAllProvider(server))); localDisposables.add(reportDiagnostics(server, advisor, languageMiddlewareFeature));
<<<<<<< public async discoverTests(fileName: string, testFrameworkName: string, noBuild: boolean): Promise<protocol.V2.TestInfo[]> { let targetFrameworkVersion = await this._recordRunAndGetFrameworkVersion(fileName, testFrameworkName); let runSettings = vscode.workspace.getConfiguration('omnisharp').get<string>('testRunSettings'); const request: protocol.V2.DiscoverTestsRequest = { FileName: fileName, RunSettings: runSettings, TestFrameworkName: testFrameworkName, TargetFrameworkVersion: targetFrameworkVersion, NoBuild: noBuild }; try { let response = await serverUtils.discoverTests(this._server, request); return response.Tests; } catch (error) { return undefined; } } public async runDotnetTest(testMethod: string, fileName: string, testFrameworkName: string, noBuild: boolean = false) { ======= private _getRunSettings(): string | undefined { return vscode.workspace.getConfiguration('omnisharp').get<string>('testRunSettings'); } private async _runDotnetTest(testMethod: string, fileName: string, testFrameworkName: string) { >>>>>>> public async discoverTests(fileName: string, testFrameworkName: string, noBuild: boolean): Promise<protocol.V2.TestInfo[]> { let targetFrameworkVersion = await this._recordRunAndGetFrameworkVersion(fileName, testFrameworkName); let runSettings = vscode.workspace.getConfiguration('omnisharp').get<string>('testRunSettings'); const request: protocol.V2.DiscoverTestsRequest = { FileName: fileName, RunSettings: runSettings, TestFrameworkName: testFrameworkName, TargetFrameworkVersion: targetFrameworkVersion, NoBuild: noBuild }; try { let response = await serverUtils.discoverTests(this._server, request); return response.Tests; } catch (error) { return undefined; } } private _getRunSettings(): string | undefined { return vscode.workspace.getConfiguration('omnisharp').get<string>('testRunSettings'); } public async runDotnetTest(testMethod: string, fileName: string, testFrameworkName: string, noBuild: boolean = false) { <<<<<<< private async _getLaunchConfigurationForLegacy(fileName: string, testMethod: string, runSettings: string, testFrameworkName: string, targetFrameworkVersion: string, noBuild: boolean): Promise<LaunchConfiguration> { // Listen for test messages while getting start info. const listener = this._server.onTestMessage(e => { this._eventStream.post(new DotNetTestMessage(e.Message)); }); const request: protocol.V2.GetTestStartInfoRequest = { FileName: fileName, MethodName: testMethod, RunSettings: runSettings, TestFrameworkName: testFrameworkName, TargetFrameworkVersion: targetFrameworkVersion, NoBuild: noBuild }; try { let response = await serverUtils.getTestStartInfo(this._server, request); return this._createLaunchConfiguration(response.Executable, response.Argument, response.WorkingDirectory, null); } finally { listener.dispose(); } } private async _getLaunchConfiguration( debugType: string, fileName: string, testMethod: string, runSettings: string, testFrameworkName: string, targetFrameworkVersion: string, debugEventListener: DebugEventListener, noBuild: boolean): Promise<LaunchConfiguration> { switch (debugType) { case 'legacy': return this._getLaunchConfigurationForLegacy(fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, noBuild); case 'vstest': return this._getLaunchConfigurationForVSTest(fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); default: throw new Error(`Unexpected debug type: ${debugType}`); } } private async _recordDebugAndGetDebugValues(fileName: string, testFrameworkName: string) { ======= private async _recordDebugAndGetDebugValues(fileName: string, testFrameworkName?: string) { >>>>>>> private async _recordDebugAndGetDebugValues(fileName: string, testFrameworkName?: string) { <<<<<<< public async debugDotnetTest(testMethod: string, fileName: string, testFrameworkName: string, noBuild: boolean = false) { // We support to styles of 'dotnet test' for debugging: The legacy 'project.json' testing, and the newer csproj support // using VS Test. These require a different level of communication. ======= private async _debugDotnetTest(testMethod: string, fileName: string, testFrameworkName: string) { >>>>>>> public async debugDotnetTest(testMethod: string, fileName: string, testFrameworkName: string, noBuild: boolean = false) { // We support to styles of 'dotnet test' for debugging: The legacy 'project.json' testing, and the newer csproj support // using VS Test. These require a different level of communication. <<<<<<< let config = await this._getLaunchConfiguration(debugType, fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); ======= let config = await this._getLaunchConfigurationForVSTest(fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener); >>>>>>> let config = await this._getLaunchConfigurationForVSTest(fileName, testMethod, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); <<<<<<< let config = await this._getLaunchConfigurationForClass(debugType, fileName, methodsToRun, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); ======= let config = await this._getLaunchConfigurationForVSTestClass(fileName, methodsToRun, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener); >>>>>>> let config = await this._getLaunchConfigurationForVSTestClass(fileName, methodsToRun, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); <<<<<<< private async _getLaunchConfigurationForClass( debugType: string, fileName: string, methodsToRun: string[], runSettings: string, testFrameworkName: string, targetFrameworkVersion: string, debugEventListener: DebugEventListener, noBuild: boolean): Promise<LaunchConfiguration> { if (debugType == 'vstest') { return this._getLaunchConfigurationForVSTestClass(fileName, methodsToRun, runSettings, testFrameworkName, targetFrameworkVersion, debugEventListener, noBuild); ======= private async _debugDotnetTestsInContext(fileName: string, fileUri: vscode.Uri, active: vscode.Position, editorLangId: string) { if (editorLangId !== "csharp") { this._eventStream.post(new DotNetTestMessage(`${vscode.workspace.asRelativePath(fileName, false)} is not a C# file, cannot run tests`)); return; } this._eventStream.post(new DotNetTestDebugInContextStart(vscode.workspace.asRelativePath(fileName, false), active.line, active.character)); let { debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName); let runSettings = this._getRunSettings(); try { let config = await this._getLaunchConfigurationForVSTestInContext(fileName, active.line, active.character, runSettings, targetFrameworkVersion, debugEventListener); if (config === null) { return; } const workspaceFolder = vscode.workspace.getWorkspaceFolder(fileUri); return vscode.debug.startDebugging(workspaceFolder, config); } catch (reason) { this._eventStream.post(new DotNetTestRunFailure(reason)); if (debugEventListener !== null) { debugEventListener.close(); } >>>>>>> private async _debugDotnetTestsInContext(fileName: string, fileUri: vscode.Uri, active: vscode.Position, editorLangId: string) { if (editorLangId !== "csharp") { this._eventStream.post(new DotNetTestMessage(`${vscode.workspace.asRelativePath(fileName, false)} is not a C# file, cannot run tests`)); return; } this._eventStream.post(new DotNetTestDebugInContextStart(vscode.workspace.asRelativePath(fileName, false), active.line, active.character)); let { debugEventListener, targetFrameworkVersion } = await this._recordDebugAndGetDebugValues(fileName); let runSettings = this._getRunSettings(); try { let config = await this._getLaunchConfigurationForVSTestInContext(fileName, active.line, active.character, runSettings, targetFrameworkVersion, debugEventListener); if (config === null) { return; } const workspaceFolder = vscode.workspace.getWorkspaceFolder(fileUri); return vscode.debug.startDebugging(workspaceFolder, config); } catch (reason) { this._eventStream.post(new DotNetTestRunFailure(reason)); if (debugEventListener !== null) { debugEventListener.close(); }
<<<<<<< // test('action - list', (t) => { // const L = new MuRDAList(new MuRDARegister(new MuFloat64())); // const store = L.createStore([]); // const dispatchers = L.action(store); // let action; // t.deepEqual(dispatchers.pop(), { type: 'remove', data: [] }, 'pop when empty'); // t.deepEqual(dispatchers.shift(), { type: 'remove', data: [] }, 'shift when empty'); // t.deepEqual(dispatchers.update(0), {}, 'update when empty'); // action = dispatchers.push(0, 1, 2, 3); // store.apply(L, action); // t.equal(action.type, 'insert', 'push type'); // t.equal(action.data.length, 4, 'push 4 number'); // t.deepEqual(action.data.map((a) => a.value).sort(), [0, 1, 2, 3], 'push content'); // action = dispatchers.pop(); // t.equal(action.type, 'remove', 'pop type'); // t.equal(action.data.length, 1, 'pop 1 member'); // action = dispatchers.shift(5); // t.equal(action.type, 'remove', 'shift type'); // t.equal(action.data.length, 4, 'cannot shift more than number of members'); // action = dispatchers.unshift(3, 2, 1); // store.apply(L, action); // t.equal(action.type, 'insert', 'unshift type'); // t.equal(action.data.length, 3, 'unshift 3 number'); // t.deepEqual(action.data.map((a) => a.value).sort(), [1, 2, 3], 'unshift content'); // action = dispatchers.pop(8); // t.equal(action.data.length, store.state(L, []).length, 'cannot pop more than number of members'); // action = dispatchers.clear(); // t.equal(action.type, 'reset', 'clear type'); // t.deepEqual(action.data, [], 'clear data'); // action = dispatchers.reset([1, 1, 2]); // store.apply(L, action); // t.equal(action.type, 'reset', 'reset type'); // t.deepEqual(action.data.length, 3, 'reset data'); // action = dispatchers.update(0)(0); // t.equal(action.type, 'update', 'update type'); // t.equal(action.data.action, 0, 'update content'); // t.end(); // }); ======= test('constrain', (t) => { const R = new MuRDARegister(new MuFloat64(), (x) => Math.max(0, Math.min(1, +x || 0))); t.equal(R.action(0.1), 0.1); t.equal(R.action(-0.1), 0); t.equal(R.action(1.1), 1); t.equal(R.action(NaN), 0); t.end(); }); test('action - list', (t) => { const L = new MuRDAList(new MuRDARegister(new MuFloat64())); const store = L.createStore([]); const dispatchers = L.action(store); let action; t.deepEqual(dispatchers.pop(), { type: 'remove', data: [] }, 'pop when empty'); t.deepEqual(dispatchers.shift(), { type: 'remove', data: [] }, 'shift when empty'); t.deepEqual(dispatchers.update(0), {}, 'update when empty'); action = dispatchers.push([0, 1, 2, 3]); store.apply(L, action); t.equal(action.type, 'insert', 'push type'); t.equal(action.data.length, 4, 'push 4 number'); t.deepEqual(action.data.map((a) => a.value).sort(), [0, 1, 2, 3], 'push content'); action = dispatchers.pop(); t.equal(action.type, 'remove', 'pop type'); t.equal(action.data.length, 1, 'pop 1 member'); action = dispatchers.shift(5); t.equal(action.type, 'remove', 'shift type'); t.equal(action.data.length, 4, 'cannot shift more than number of members'); action = dispatchers.unshift([3, 2, 1]); store.apply(L, action); t.equal(action.type, 'insert', 'unshift type'); t.equal(action.data.length, 3, 'unshift 3 number'); t.deepEqual(action.data.map((a) => a.value).sort(), [1, 2, 3], 'unshift content'); action = dispatchers.pop(8); t.equal(action.data.length, store.state(L, []).length, 'cannot pop more than number of members'); action = dispatchers.clear(); t.equal(action.type, 'reset', 'clear type'); t.deepEqual(action.data, [], 'clear data'); action = dispatchers.reset([1, 1, 2]); store.apply(L, action); t.equal(action.type, 'reset', 'reset type'); t.deepEqual(action.data.length, 3, 'reset data'); action = dispatchers.update(0)(0); t.equal(action.type, 'update', 'update type'); t.equal(action.data.action, 0, 'update content'); t.end(); }); >>>>>>> test('constrain', (t) => { const R = new MuRDARegister(new MuFloat64(), (x) => Math.max(0, Math.min(1, +x || 0))); t.equal(R.action(0.1), 0.1); t.equal(R.action(-0.1), 0); t.equal(R.action(1.1), 1); t.equal(R.action(NaN), 0); t.end(); }); // test('action - list', (t) => { // const L = new MuRDAList(new MuRDARegister(new MuFloat64())); // const store = L.createStore([]); // const dispatchers = L.action(store); // let action; // t.deepEqual(dispatchers.pop(), { type: 'remove', data: [] }, 'pop when empty'); // t.deepEqual(dispatchers.shift(), { type: 'remove', data: [] }, 'shift when empty'); // t.deepEqual(dispatchers.update(0), {}, 'update when empty'); // action = dispatchers.push(0, 1, 2, 3); // store.apply(L, action); // t.equal(action.type, 'insert', 'push type'); // t.equal(action.data.length, 4, 'push 4 number'); // t.deepEqual(action.data.map((a) => a.value).sort(), [0, 1, 2, 3], 'push content'); // action = dispatchers.pop(); // t.equal(action.type, 'remove', 'pop type'); // t.equal(action.data.length, 1, 'pop 1 member'); // action = dispatchers.shift(5); // t.equal(action.type, 'remove', 'shift type'); // t.equal(action.data.length, 4, 'cannot shift more than number of members'); // action = dispatchers.unshift(3, 2, 1); // store.apply(L, action); // t.equal(action.type, 'insert', 'unshift type'); // t.equal(action.data.length, 3, 'unshift 3 number'); // t.deepEqual(action.data.map((a) => a.value).sort(), [1, 2, 3], 'unshift content'); // action = dispatchers.pop(8); // t.equal(action.data.length, store.state(L, []).length, 'cannot pop more than number of members'); // action = dispatchers.clear(); // t.equal(action.type, 'reset', 'clear type'); // t.deepEqual(action.data, [], 'clear data'); // action = dispatchers.reset([1, 1, 2]); // store.apply(L, action); // t.equal(action.type, 'reset', 'reset type'); // t.deepEqual(action.data.length, 3, 'reset data'); // action = dispatchers.update(0)(0); // t.equal(action.type, 'update', 'update type'); // t.equal(action.data.action, 0, 'update content'); // t.end(); // });
<<<<<<< public readonly emptyStore:MuRDARegisterStore<this>; constructor (stateSchema:StateSchema) { ======= public constrain:(value:StateSchema['identity']) => StateSchema['identity']; constructor ( stateSchema:StateSchema, constrain?:(value:StateSchema['identity']) => StateSchema['identity']) { >>>>>>> public readonly emptyStore:MuRDARegisterStore<this>; public constrain:(value:StateSchema['identity']) => StateSchema['identity']; constructor ( stateSchema:StateSchema, constrain?:(value:StateSchema['identity']) => StateSchema['identity']) { <<<<<<< this.emptyStore = new MuRDARegisterStore<this>(stateSchema.identity); ======= this.constrain = constrain || identity; >>>>>>> this.constrain = constrain || identity; this.emptyStore = new MuRDARegisterStore<this>(stateSchema.identity);
<<<<<<< } export const DefaultRPCSchema = { client: { call: new MuStruct({ id: new MuString(), methodName: new MuString(), arg: new MuArray(new MuInt8()), //FIXME: arg type should be same as the schema in examples }), response: new MuStruct({ id: new MuString(), err: new MuString(), //FIXME: err maybe undefined response: new MuInt8(), //FIXME: response maybe undefined }), }, server: { call: new MuStruct({ id: new MuString(), methodName: new MuString(), arg: new MuArray(new MuInt8()), }), response: new MuStruct({ id: new MuString(), err: new MuString(), response: new MuInt8(), }), }, }; export function generateId() { return (Date.now() + Math.random()).toString(); ======= } export interface MuRPCProtocolTablePhase<RPCTable extends MuRPCTable, Phase extends '0' | '1'> { schema:{ [method in keyof RPCTable]:MuStruct<{ base:RPCTable[method][Phase]; id:MuUint32; }>; }; } export interface MuRPCProtocolSchemaPhase<ProtocolSchema extends MuRPCProtocolSchema, Phase extends '0' | '1'> { client:MuRPCProtocolTablePhase<ProtocolSchema['client'], Phase>['schema']; server:MuRPCProtocolTablePhase<ProtocolSchema['server'], Phase>['schema']; } export interface MuRPCProtocolSchemaInterface<ProtocolSchema extends MuRPCProtocolSchema> { '0':MuRPCProtocolSchemaPhase<ProtocolSchema, '0'>; '1':MuRPCProtocolSchemaPhase<ProtocolSchema, '1'>; } export function createRPCProtocolSchemas<ProtocolSchema extends MuRPCProtocolSchema>( schema:ProtocolSchema) : MuRPCProtocolSchemaInterface<ProtocolSchema> { const protocolSchema = {}; for (let i = 0; i < 2; ++i) { const result = { client: {}, server: {}, }; Object.keys(schema.client).map((method) => result.client[method] = new MuStruct({ base: schema.client[method][i], id: new MuUint32(), })); Object.keys(schema.server).map((method) => result.server[method] = new MuStruct({ base: schema.server[method][i], id: new MuUint32(), })); protocolSchema[i] = result; } return <MuRPCProtocolSchemaInterface<ProtocolSchema>>protocolSchema; >>>>>>> } export const DefaultRPCSchema = { client: { call: new MuStruct({ id: new MuString(), methodName: new MuString(), arg: new MuArray(new MuInt8()), //FIXME: arg type should be same as the schema in examples }), response: new MuStruct({ id: new MuString(), err: new MuString(), //FIXME: err maybe undefined response: new MuInt8(), //FIXME: response maybe undefined }), }, server: { call: new MuStruct({ id: new MuString(), methodName: new MuString(), arg: new MuArray(new MuInt8()), }), response: new MuStruct({ id: new MuString(), err: new MuString(), response: new MuInt8(), }), }, }; export function generateId() { return (Date.now() + Math.random()).toString(); } export interface MuRPCProtocolTablePhase<RPCTable extends MuRPCTable, Phase extends '0' | '1'> { schema:{ [method in keyof RPCTable]:MuStruct<{ base:RPCTable[method][Phase]; id:MuUint32; }>; }; } export interface MuRPCProtocolSchemaPhase<ProtocolSchema extends MuRPCProtocolSchema, Phase extends '0' | '1'> { client:MuRPCProtocolTablePhase<ProtocolSchema['client'], Phase>['schema']; server:MuRPCProtocolTablePhase<ProtocolSchema['server'], Phase>['schema']; } export interface MuRPCProtocolSchemaInterface<ProtocolSchema extends MuRPCProtocolSchema> { '0':MuRPCProtocolSchemaPhase<ProtocolSchema, '0'>; '1':MuRPCProtocolSchemaPhase<ProtocolSchema, '1'>; } export function createRPCProtocolSchemas<ProtocolSchema extends MuRPCProtocolSchema>( schema:ProtocolSchema) : MuRPCProtocolSchemaInterface<ProtocolSchema> { const protocolSchema = {}; for (let i = 0; i < 2; ++i) { const result = { client: {}, server: {}, }; Object.keys(schema.client).map((method) => result.client[method] = new MuStruct({ base: schema.client[method][i], id: new MuUint32(), })); Object.keys(schema.server).map((method) => result.server[method] = new MuStruct({ base: schema.server[method][i], id: new MuUint32(), })); protocolSchema[i] = result; } return <MuRPCProtocolSchemaInterface<ProtocolSchema>>protocolSchema;
<<<<<<< ======= static dir(message: string, params: any[], moduleName: string, moduleColor: string, level: Level) { let color = 'gray'; if (level === Level.INFO) color = 'deepskyblue'; if (level === Level.ERROR) color = 'red'; if (level === Level.WARN) color = 'orange'; let a1 = '%c ' + moduleName + ' %c ' + message + ' '; let a2 = 'background: ' + moduleColor + ';color:white; '; let a3 = 'border: 1px solid ' + color + '; '; params.unshift(a3); params.unshift(a2); params.unshift(a1); params = _.map(params, (object: any) => { if (typeof object === "object") { return _.cloneDeep(object); } return object; }); console.log.apply(console, params); } >>>>>>> static dir(message: string, params: any[], moduleName: string, moduleColor: string, level: Level) { let color = 'gray'; if (level === Level.INFO) color = 'deepskyblue'; if (level === Level.ERROR) color = 'red'; if (level === Level.WARN) color = 'orange'; let a1 = '%c ' + moduleName + ' %c ' + message + ' '; let a2 = 'background: ' + moduleColor + ';color:white; '; let a3 = 'border: 1px solid ' + color + '; '; params.unshift(a3); params.unshift(a2); params.unshift(a1); params = _.map(params, (object: any) => { if (typeof object === "object") { return _.cloneDeep(object); } return object; }); console.log.apply(console, params); }
<<<<<<< ======= public mute() { this.isMuted = true; } >>>>>>> public mute() { this.isMuted = true; }
<<<<<<< export abstract class DxComponent implements OnChanges, AfterViewInit { ======= declare let $: any; const startupEvents = ['onInitialized', 'onContentReady']; export class DxComponent implements OnChanges, AfterViewInit { >>>>>>> const startupEvents = ['onInitialized', 'onContentReady']; export abstract class DxComponent implements OnChanges, AfterViewInit {
<<<<<<< this.serialNumber = this.utilService.generateRandomSerial(); const coinToMint = this.mintCoinForm.controls['A'].value; if (!coinToMint) return; if (coinToMint > this.coinCount) { return this.toastr.error('You do not have enough ERC-20 tokens'); } this.isRequesting = true; var hexValue = (coinToMint).toString(16); ======= this.isRequesting = true; var hexValue = (this.mintCoinForm.controls['A'].value).toString(16); >>>>>>> const coinToMint = this.mintCoinForm.controls['A'].value; if (!coinToMint) return; if (coinToMint > this.coinCount) { return this.toastr.error('You do not have enough ERC-20 tokens'); } this.isRequesting = true; var hexValue = (coinToMint).toString(16);
<<<<<<< let isTranscludedContent = widget['IsTranscludedContent'], className = inflector.camelize(widgetName), ======= let isTranscludedContent = widget.IsTranscludedContent, isExtension = widget.IsExtensionComponent || false, >>>>>>> let isTranscludedContent = widget.IsTranscludedContent, isExtension = widget.IsExtensionComponent || false, className = inflector.camelize(widgetName),
<<<<<<< static compileFile(file: File, from: Language, to: Language, options = ""): Promise<any> { return new Promise((resolve, reject) => { Service.compile(file.getData(), from, to, options).then((result) => { let markers = Service.getMarkers(result.tasks[0].console); if (markers.length) { monaco.editor.setModelMarkers(file.buffer, "compiler", markers); file.setProblems(markers.map(marker => { return Problem.fromMarker(file, marker); })); } if (!result.success) { reject(); return; } var buffer = atob(result.output); var data = new Uint8Array(buffer.length); for (var i = 0; i < buffer.length; i++) { data[i] = buffer.charCodeAt(i); } resolve(data); }); }); ======= static async compileFile(file: File, from: Language, to: Language, options = ""): Promise<any> { const result = await Service.compile(file.getData(), from, to, options); let markers = Service.getMarkers(result.tasks[0].console); if (markers.length) { monaco.editor.setModelMarkers(file.buffer, "compiler", markers); file.setProblems(markers.map(marker => { return Problem.fromMarker(marker); })); } if (!result.success) { throw new Error((result as any).message); } var buffer = atob(result.output); var data = new Uint8Array(buffer.length); for (var i = 0; i < buffer.length; i++) { data[i] = buffer.charCodeAt(i); } return data; >>>>>>> static async compileFile(file: File, from: Language, to: Language, options = ""): Promise<any> { const result = await Service.compile(file.getData(), from, to, options); let markers = Service.getMarkers(result.tasks[0].console); if (markers.length) { monaco.editor.setModelMarkers(file.buffer, "compiler", markers); file.setProblems(markers.map(marker => { return Problem.fromMarker(file, marker); })); } if (!result.success) { throw new Error((result as any).message); } var buffer = atob(result.output); var data = new Uint8Array(buffer.length); for (var i = 0; i < buffer.length; i++) { data[i] = buffer.charCodeAt(i); } return data;
<<<<<<< const htmlDesktopTemplateCode = readTemplate(config.output.templates.desktop); const articleListHomeTemplate = readTemplate(config.output.templates.articleListHomeTemplate); ======= >>>>>>> const articleListHomeTemplate = readTemplate(config.output.templates.articleListHomeTemplate); <<<<<<< // console.info(`Getting [${type}] module [${module}]`); ======= logger.info(`Getting [${type}] module [${module}]`); >>>>>>> logger.info(`Getting [${type}] module [${module}]`); <<<<<<< } else { const articleUrl = parsoidUrl + encodeURIComponent(articleId) + (parsoidUrl.indexOf('/rest') < 0 ? `${parsoidUrl.indexOf('?') < 0 ? '?' : '&'}oldid=` : '/') + articleDetailXId[articleId].oldId; logger.log(`Getting (desktop) article from ${articleUrl}`); setTimeout( skipHtmlCache || articleId === zim.mainPageId ? downloader.downloadContent.bind(downloader) : downloadContentAndCache, downloadFileQueue.length() + optimizationQueue.length(), articleUrl, (content) => { let json; if (parsoidContentType === 'json') { try { json = JSON.parse(content.toString()); } catch (e) { // TODO: Figure out why this is happening html = content.toString(); console.error(e); ======= // set all other section (closed by default) if (!env.nodet) { json.remaining.sections.forEach((oneSection, i) => { if (i === 0 && oneSection.toclevel !== 1) { // We need at least one Top Level Section html += sectionTemplate({ section_index: i, section_id: i, section_anchor: 'TopLevelSection', section_line: 'Disambiguation', section_text: '', }); >>>>>>> // set all other section (closed by default) if (!env.nodet) { json.remaining.sections.forEach((oneSection, i) => { if (i === 0 && oneSection.toclevel !== 1) { // We need at least one Top Level Section html += sectionTemplate({ section_index: i, section_id: i, section_anchor: 'TopLevelSection', section_line: 'Disambiguation', section_text: '', }); <<<<<<< console.error(`Article ${entry.title} is not available on this wiki.`); delete articleDetailXId[entry.title]; ======= logger.warn(`Article ${entry.title} is not available on this wiki.`); delete articleIds[entry.title]; >>>>>>> logger.warn(`Article ${entry.title} is not available on this wiki.`); delete articleDetailXId[entry.title]; <<<<<<< logger.log(`Unable to get revisions for ${entry.title}, but entry exists in the database. Article was probably deleted meanwhile.`); delete articleDetailXId[entry.title]; ======= logger.warn(`Unable to get revisions for ${entry.title}, but entry exists in the database. Article was probably deleted meanwhile.`); delete articleIds[entry.title]; >>>>>>> logger.warn(`Unable to get revisions for ${entry.title}, but entry exists in the database. Article was probably deleted meanwhile.`); delete articleDetailXId[entry.title]; <<<<<<< return new Promise((resolve, reject) => { async.eachLimit(lines, speed, (line, finish) => getArticleIdsForLine(redirectQueue, line).then(() => finish(), (err) => finish(err)), (error) => { if (error) { reject(`Unable to get all article ids for a file: ${error}`); } else { logger.log('List of article ids to mirror completed'); drainRedirectQueue(redirectQueue).then(resolve, reject); } }); ======= async.eachLimit( lines, speed, (line, finish) => getArticleIdsForLine(redirectQueue, line).then(() => finish(), (err) => finish(err)), (error) => { if (error) { reject({ message: `Unable to get all article ids for a file`, error }); } else { logger.log('List of article ids to mirror completed'); drainRedirectQueue(redirectQueue).then(resolve, reject); } }, ); >>>>>>> return new Promise((resolve, reject) => { async.eachLimit( lines, speed, (line, finish) => getArticleIdsForLine(redirectQueue, line).then(() => finish(), (err) => finish(err)), (error) => { if (error) { reject({ message: `Unable to get all article ids for a file`, error }); } else { logger.log('List of article ids to mirror completed'); drainRedirectQueue(redirectQueue).then(resolve, reject); } }); <<<<<<< console.log(`Cache stat: [${mediaPath}]`, fs.statSync(cachePath).size); logger.log(`Caching ${filenameBase} at ${cachePath}...`); ======= logger.info(`Caching ${filenameBase} at ${cachePath}...`); >>>>>>> logger.info(`Caching ${filenameBase} at ${cachePath}...`); <<<<<<< logger.log(`Cache hit for ${url}`); console.info(`Found cached file [${url}] with mediaPath [${mediaPath}]`); ======= logger.info(`Cache hit for ${url}`); >>>>>>> logger.info(`Cache hit for ${url}`);
<<<<<<< export abstract class DxComponentBase implements OnChanges { ======= export abstract class DxComponent implements AfterViewInit { >>>>>>> export abstract class DxComponentBase { <<<<<<< ngOnChanges(changes: { [key: string]: SimpleChange }) { Object.keys(changes).forEach(propertyName => { let change = changes[propertyName]; if (this.instance) { this._isChangesProcessing = true; // prevent cycle change event emitting this.instance.option(propertyName, change.currentValue); this._isChangesProcessing = false; } else { this._initialOptions[propertyName] = change.currentValue; } }); } } export abstract class DxComponent extends DxComponentBase implements AfterViewInit { ======= >>>>>>> } export abstract class DxComponent extends DxComponentBase implements AfterViewInit {
<<<<<<< if (!JSON.parse(body).error) { const redirects = {}; let redirectsCount = 0; const { pages } = JSON.parse(body).query; pages[Object.keys(pages)[0]].redirects.map((entry) => { const title = entry.title.replace(/ /g, mw.spaceDelimiter); redirects[title] = articleId; redirectsCount += 1; if (title === zim.mainPageId) { zim.mainPageId = articleId; } }); logger.log(`${redirectsCount} redirect(s) found for ${articleId}`); redis.saveRedirects(redirectsCount, redirects, finished); } else { finished(JSON.parse(body).error); ======= try { if (!JSON.parse(body).error) { const redirects = {}; let redirectsCount = 0; const { pages } = JSON.parse(body).query; pages[Object.keys(pages)[0]].redirects.map((entry) => { const title = entry.title.replace(/ /g, mw.spaceDelimiter); redirects[title] = articleId; redirectsCount += 1; if (title === zim.mainPageId) { zim.mainPageId = articleId; } }); logger.info(`${redirectsCount} redirect(s) found for ${articleId}`); redis.saveRedirects(redirectsCount, redirects, finished); } else { finished(JSON.parse(body).error); } } catch (error) { finished(error); >>>>>>> if (!JSON.parse(body).error) { const redirects = {}; let redirectsCount = 0; const { pages } = JSON.parse(body).query; pages[Object.keys(pages)[0]].redirects.map((entry) => { const title = entry.title.replace(/ /g, mw.spaceDelimiter); redirects[title] = articleId; redirectsCount += 1; if (title === zim.mainPageId) { zim.mainPageId = articleId; } }); logger.info(`${redirectsCount} redirect(s) found for ${articleId}`); redis.saveRedirects(redirectsCount, redirects, finished); } else { finished(JSON.parse(body).error); <<<<<<< logger.log('Saving HTML redirects...'); function saveHtmlRedirect(redirectId, finished) { redis.getRedirect(redirectId, finished, (target) => { logger.log(`Writing HTML redirect ${redirectId} (to ${target})...`); const data = redirectTemplate({ target: env.getArticleUrl(target), title: redirectId.replace(/_/g, ' '), ======= return new Promise((resolve, reject) => { logger.log('Saving HTML redirects...'); function saveHtmlRedirect(redirectId, finished) { redis.getRedirect(redirectId, finished, (target) => { logger.info(`Writing HTML redirect ${redirectId} (to ${target})...`); const data = redirectTemplate({ target: env.getArticleUrl(target), title: redirectId.replace(/_/g, ' '), }); if (env.deflateTmpHtml) { zlib.deflate(data, (error, deflatedHtml) => { fs.writeFile(env.getArticlePath(redirectId), deflatedHtml, finished); }); } else { fs.writeFile(env.getArticlePath(redirectId), data, finished); } >>>>>>> logger.log('Saving HTML redirects...'); function saveHtmlRedirect(redirectId, finished) { redis.getRedirect(redirectId, finished, (target) => { logger.info(`Writing HTML redirect ${redirectId} (to ${target})...`); const data = redirectTemplate({ target: env.getArticleUrl(target), title: redirectId.replace(/_/g, ' '), <<<<<<< logger.log(`Getting (desktop) article from ${articleUrl}`); const downloadFunc = skipHtmlCache || articleId === zim.mainPageId ? downloader.downloadContent.bind(downloader) : downloadContentAndCache; setTimeout((url, handler) => { downloadFunc(url) .then(({ content }) => handler(content)) .catch((err) => { console.error(`Failed to get article [${articleUrl}] Skipping.`, err); finished(); }); }, ======= logger.info(`Getting (desktop) article from ${articleUrl}`); setTimeout( skipHtmlCache || articleId === zim.mainPageId ? downloader.downloadContent.bind(downloader) : downloadContentAndCache, >>>>>>> logger.info(`Getting (desktop) article from ${articleUrl}`); const downloadFunc = skipHtmlCache || articleId === zim.mainPageId ? downloader.downloadContent.bind(downloader) : downloadContentAndCache; setTimeout((url, handler) => { downloadFunc(url) .then(({ content }) => handler(content)) .catch((err) => { console.error(`Failed to get article [${articleUrl}] Skipping.`, err); finished(); }); }, <<<<<<< if (!error) { logger.log(`Successfully dumped article ${articleId}`); finished(); } else { console.error(`Error preparing and saving file, skipping [${articleId}]`, error); } ======= if (!error) { logger.info(`Successfully dumped article ${articleId}`); } finished(error && { message: `Error preparing and saving file`, error }); >>>>>>> if (!error) { logger.info(`Successfully dumped article ${articleId}`); finished(); } else { logger.warn(`Error preparing and saving file, skipping [${articleId}]`, error); finished(error); } <<<<<<< logger.log(`Downloading CSS from ${decodeURI(cssUrl)}`); const { content } = await downloader.downloadContent(cssUrl); ======= logger.info(`Downloading CSS from ${decodeURI(cssUrl)}`); downloader.downloadContent(cssUrl, (content) => { >>>>>>> logger.info(`Downloading CSS from ${decodeURI(cssUrl)}`); const { content } = await downloader.downloadContent(cssUrl); <<<<<<< const parsedUrl = urlParser.parse(entries.logo); const ext = parsedUrl.pathname.split('.').slice(-1)[0]; const faviconPath = env.htmlRootPath + `favicon.${ext}`; const faviconFinalPath = env.htmlRootPath + `favicon.png`; const logoUrl = parsedUrl.protocol ? entries.logo : 'http:' + entries.logo; downloader.downloadMediaFile(logoUrl, faviconPath, true, optimizationQueue, async () => { if (ext !== 'png') { console.warn(`Original favicon is not a PNG ([${ext}]). Converting it to PNG`); await new Promise((resolve, reject) => { exec(`convert ${faviconPath} ${faviconFinalPath}`, (err) => { if (err) { reject(err); } else { resolve(); } }); ======= const parsedUrl = urlParser.parse(entries.logo); const ext = parsedUrl.pathname.split('.').slice(-1)[0]; const faviconPath = env.htmlRootPath + `favicon.${ext}`; const faviconFinalPath = env.htmlRootPath + `favicon.png`; const logoUrl = parsedUrl.protocol ? entries.logo : 'http:' + entries.logo; downloader.downloadMediaFile(logoUrl, faviconPath, true, optimizationQueue, async () => { if (ext !== 'png') { logger.log(`Original favicon is not a PNG ([${ext}]). Converting it to PNG`); await new Promise((resolve, reject) => { exec(`convert ${faviconPath} ${faviconFinalPath}`, (err) => { if (err) { reject(err); } else { resolve(); } >>>>>>> const parsedUrl = urlParser.parse(entries.logo); const ext = parsedUrl.pathname.split('.').slice(-1)[0]; const faviconPath = env.htmlRootPath + `favicon.${ext}`; const faviconFinalPath = env.htmlRootPath + `favicon.png`; const logoUrl = parsedUrl.protocol ? entries.logo : 'http:' + entries.logo; downloader.downloadMediaFile(logoUrl, faviconPath, true, optimizationQueue, async () => { if (ext !== 'png') { console.info(`Original favicon is not a PNG ([${ext}]). Converting it to PNG`); await new Promise((resolve, reject) => { exec(`convert ${faviconPath} ${faviconFinalPath}`, (err) => { if (err) { reject(err); } else { resolve(); } });
<<<<<<< newNoteFromSelectionReplacementTemplate: string; ======= lowercaseNewNoteFilenames: boolean; >>>>>>> newNoteFromSelectionReplacementTemplate: string; lowercaseNewNoteFilenames: boolean; <<<<<<< newNoteFromSelectionReplacementTemplate: '[[${wikiLink}]]', ======= lowercaseNewNoteFilenames: true, >>>>>>> newNoteFromSelectionReplacementTemplate: '[[${wikiLink}]]', lowercaseNewNoteFilenames: true, <<<<<<< newNoteFromSelectionReplacementTemplate: c.get('newNoteFromSelectionReplacementTemplate') as string, ======= lowercaseNewNoteFilenames: c.get('lowercaseNewNoteFilenames') as boolean, >>>>>>> newNoteFromSelectionReplacementTemplate: c.get('newNoteFromSelectionReplacementTemplate') as string, lowercaseNewNoteFilenames: c.get('lowercaseNewNoteFilenames') as boolean, <<<<<<< static newNoteFromSelectionReplacementTemplate(): string { return this.cfg().newNoteFromSelectionReplacementTemplate; } ======= static lowercaseNewNoteFilenames(): boolean { return this.cfg().lowercaseNewNoteFilenames; } >>>>>>> static newNoteFromSelectionReplacementTemplate(): string { return this.cfg().newNoteFromSelectionReplacementTemplate; } static lowercaseNewNoteFilenames(): boolean { return this.cfg().lowercaseNewNoteFilenames; }
<<<<<<< triggerSuggestOnReplacement: boolean; ======= allowPipedWikiLinks: boolean; pipedWikiLinksSyntax: PipedWikilinksSyntax; pipedWikiLinksSeparator: string; >>>>>>> triggerSuggestOnReplacement: boolean; allowPipedWikiLinks: boolean; pipedWikiLinksSyntax: PipedWikilinksSyntax; pipedWikiLinksSeparator: string; <<<<<<< triggerSuggestOnReplacement: NoteWorkspace._defaultTriggerSuggestOnReplacement, ======= allowPipedWikiLinks: false, pipedWikiLinksSyntax: PipedWikilinksSyntax.descfile, pipedWikiLinksSeparator: "\\|", >>>>>>> triggerSuggestOnReplacement: NoteWorkspace._defaultTriggerSuggestOnReplacement, allowPipedWikiLinks: false, pipedWikiLinksSyntax: PipedWikilinksSyntax.descfile, pipedWikiLinksSeparator: "\\|", <<<<<<< triggerSuggestOnReplacement: c.get('triggerSuggestOnReplacement') as boolean, ======= allowPipedWikiLinks: c.get('allowPipedWikiLinks') as boolean, pipedWikiLinksSyntax: c.get('pipedWikiLinksSyntax') as PipedWikilinksSyntax, pipedWikiLinksSeparator: c.get('pipedWikiLinksSeparator') as string, >>>>>>> triggerSuggestOnReplacement: c.get('triggerSuggestOnReplacement') as boolean, allowPipedWikiLinks: c.get('allowPipedWikiLinks') as boolean, pipedWikiLinksSyntax: c.get('pipedWikiLinksSyntax') as PipedWikilinksSyntax, pipedWikiLinksSeparator: c.get('pipedWikiLinksSeparator') as string, <<<<<<< static triggerSuggestOnReplacement() { return this.cfg().triggerSuggestOnReplacement; } ======= static allowPipedWikiLinks(): boolean { return this.cfg().allowPipedWikiLinks; } static pipedWikiLinksSyntax(): string { return this.cfg().pipedWikiLinksSyntax; } static pipedWikiLinksSeparator(): string { return this.cfg().pipedWikiLinksSeparator; } >>>>>>> static triggerSuggestOnReplacement() { return this.cfg().triggerSuggestOnReplacement; static allowPipedWikiLinks(): boolean { return this.cfg().allowPipedWikiLinks; } static pipedWikiLinksSyntax(): string { return this.cfg().pipedWikiLinksSyntax; } static pipedWikiLinksSeparator(): string { return this.cfg().pipedWikiLinksSeparator; }
<<<<<<< import express from "express"; import path from "path"; import queryString from "querystring"; ======= // import { Request, Response, NextFunction } from "express"; import express from 'express'; const app: Express.Application = express(); >>>>>>> import express from "express"; import path from "path"; import queryString from "querystring"; const app: Express.Application = express(); <<<<<<< return function( req: express.Request, res: express.Response, ======= return function ( req: Express.Request, res: Express.Response, >>>>>>> return function ( req: Express.Request, res: Express.Response, <<<<<<< createCallback: (res: { headers: string; statusCode: number }) => {}, promiseHandler: (promise: Function, cb: Function) => {} ======= //headers are for now any.. will find bette way later createCallback: (res: { body: string; statusCode: number; headers: any }) => { // res.body = 'sadf'; return function callback(err: Error, lambdaResponse: any) { // res.body = 'sadf'; // console.log(lambdaResponse); if (err) return err res.statusCode = lambdaResponse.statusCode; for (let key in lambdaResponse.headers) { res.headers[key] = lambdaResponse.headers[key]; } if (lambdaResponse.body) { res.body = lambdaResponse.body; } } }, promiseHandler: (promise: Function, cb: Function) => { }, >>>>>>> //headers are for now any.. will find bette way later createCallback: (res: { body: string; statusCode: number; headers: any }) => { // res.body = 'sadf'; return function callback(err: Error, lambdaResponse: any) { // res.body = 'sadf'; // console.log(lambdaResponse); if (err) return err res.statusCode = lambdaResponse.statusCode; for (let key in lambdaResponse.headers) { res.headers[key] = lambdaResponse.headers[key]; } if (lambdaResponse.body) { res.body = lambdaResponse.body; } } }, promiseHandler: (promise: Function, cb: Function) => { },
<<<<<<< const build_handler = () => { indexer.build_index().then((_) => saveIndex()); }; const instantiate_handler = () => { moduleInstantiator.instantiateModule(); }; ======= context.subscriptions.push(languages.registerDocumentRangeFormattingEditProvider(selector, formatProvider)); context.subscriptions.push(languages.registerDocumentFormattingEditProvider(selector, formatProvider)); const build_handler = () => { indexer.build_index().then( _ => saveIndex() ) }; const instantiate_handler = () => { moduleInstantiator.instantiateModule() }; >>>>>>> context.subscriptions.push(languages.registerDocumentRangeFormattingEditProvider(selector, formatProvider)); context.subscriptions.push(languages.registerDocumentFormattingEditProvider(selector, formatProvider)); const build_handler = () => { indexer.build_index().then((_) => saveIndex()); }; const instantiate_handler = () => { moduleInstantiator.instantiateModule(); };
<<<<<<< needsReview reviewedByUserId ======= descriptionTruncationCount >>>>>>> needsReview reviewedByUserId descriptionTruncationCount
<<<<<<< var requestOptions: any = { ======= const { value: mozillaHubsAPIKey } = mozillaHubsAPIKeyResult const { value: mozillaHubsUserId } = mozillaHubsUserIdResult var requestOptions = { >>>>>>> const { value: mozillaHubsAPIKey } = mozillaHubsAPIKeyResult const { value: mozillaHubsUserId } = mozillaHubsUserIdResult var requestOptions: any = {
<<<<<<< import { wrapVulcanAsyncScript } from './utils' import { Vulcan, getSetting } from '../vulcan-lib'; import { Posts } from '../../lib/collections/posts' import Users from '../../lib/collections/users/collection' import { makeLowKarmaSelector, LOW_KARMA_THRESHOLD } from '../migrations/2020-05-13-noIndexLowKarma'; import fs from 'mz/fs' import path from 'path' import moment from 'moment' import Papa from 'papaparse' ======= import moment from 'moment'; import fs from 'mz/fs'; import Papa from 'papaparse'; import path from 'path'; import { Posts } from '../../lib/collections/posts'; import Users from '../../lib/collections/users/collection'; import { siteUrlSetting } from '../../lib/instanceSettings'; import { Vulcan } from '../vulcan-lib'; import { wrapVulcanAsyncScript } from './utils'; >>>>>>> import moment from 'moment'; import fs from 'mz/fs'; import Papa from 'papaparse'; import path from 'path'; import { Posts } from '../../lib/collections/posts'; import Users from '../../lib/collections/users/collection'; import { siteUrlSetting } from '../../lib/instanceSettings'; import { Vulcan } from '../vulcan-lib'; import { wrapVulcanAsyncScript } from './utils'; import { makeLowKarmaSelector, LOW_KARMA_THRESHOLD } from '../migrations/2020-05-13-noIndexLowKarma'; <<<<<<< const user = Users.findOne(post.userId, { fields: { displayName: 1, email: 1 }}) const postUrl = getSetting('siteUrl') ======= const user = Users.findOne(post.userId, { fields: { username: 1, email: 1 }}) if (!user) throw Error(`Can't find user for post: ${post._id}`) const postUrl = siteUrlSetting.get() >>>>>>> const user = Users.findOne(post.userId, { fields: { displayName: 1, email: 1 }}) if (!user) throw Error(`Can't find user for post: ${post._id}`) const postUrl = siteUrlSetting.get()
<<<<<<< petrovPressedButtonDate ======= sortDrafts reenableDraftJs >>>>>>> petrovPressedButtonDate sortDrafts reenableDraftJs
<<<<<<< export interface IdMap {[key: string]: string;} ======= wrapDynamicImportPlugin(acorn); export interface IdMap { [key: string]: string; } >>>>>>> export interface IdMap { [key: string]: string; } <<<<<<< return parse(module.code, assign({ ======= return acorn.parse(module.code, Object.assign({ >>>>>>> return parse(module.code, Object.assign({
<<<<<<< Posts.addView("shortformDiscussionThreadsList", (terms: PostsViewTerms) => { ======= Posts.addView("2019reviewRecentDiscussionThreadsList", terms => { return { selector: { ...recentDiscussionFilter, nominationCount2019: { $gt: 0 } }, options: { sort: {lastCommentedAt:-1}, limit: terms.limit || 12, } } }) ensureIndex(Posts, augmentForDefaultView({ nominationCount2019: 1, lastCommentedAt:-1, baseScore:1, hideFrontpageComments:1 }), { name: "posts.2019reviewRecentDiscussionThreadsList", } ); Posts.addView("shortformDiscussionThreadsList", terms => { >>>>>>> Posts.addView("2019reviewRecentDiscussionThreadsList", (terms: PostsViewTerms) => { return { selector: { ...recentDiscussionFilter, nominationCount2019: { $gt: 0 } }, options: { sort: {lastCommentedAt:-1}, limit: terms.limit || 12, } } }) ensureIndex(Posts, augmentForDefaultView({ nominationCount2019: 1, lastCommentedAt:-1, baseScore:1, hideFrontpageComments:1 }), { name: "posts.2019reviewRecentDiscussionThreadsList", } ); Posts.addView("shortformDiscussionThreadsList", (terms: PostsViewTerms) => { <<<<<<< Posts.addView("reviews2018", (terms: PostsViewTerms) => { ======= Posts.addView("nominations2019", terms => { return { selector: { nominationCount2019: { $gt: 0 } }, options: { sort: { nominationCount2019: terms.sortByMost ? -1 : 1 } } } }) ensureIndex(Posts, augmentForDefaultView({ nominationCount2019:1 }), { name: "posts.nominations2019", } ); Posts.addView("reviews2018", terms => { >>>>>>> Posts.addView("nominations2019", (terms: PostsViewTerms) => { return { selector: { nominationCount2019: { $gt: 0 } }, options: { sort: { nominationCount2019: terms.sortByMost ? -1 : 1 } } } }) ensureIndex(Posts, augmentForDefaultView({ nominationCount2019:1 }), { name: "posts.nominations2019", } ); Posts.addView("reviews2018", (terms: PostsViewTerms) => {
<<<<<<< // Whether to point RSS links to the linked URL (“link”) or back to the post page (“page”) const outsideLinksPointToSetting = new DatabasePublicSetting<string>('forum.outsideLinksPointTo', 'link') Posts.getShareableLink = function (post) { return outsideLinksPointToSetting.get() === 'link' ? Posts.getLink(post) : Posts.getPageUrl(post, true); ======= Posts.getShareableLink = function (post: PostsBase|DbPost): string { return getSetting('forum.outsideLinksPointTo', 'link') === 'link' ? Posts.getLink(post) : Posts.getPageUrl(post, true); >>>>>>> // Whether to point RSS links to the linked URL (“link”) or back to the post page (“page”) const outsideLinksPointToSetting = new DatabasePublicSetting<string>('forum.outsideLinksPointTo', 'link') Posts.getShareableLink = function (post: PostsBase|DbPost): string { return outsideLinksPointToSetting.get() === 'link' ? Posts.getLink(post) : Posts.getPageUrl(post, true); <<<<<<< const postsRequireApprovalSetting = new DatabasePublicSetting<boolean>('forum.requirePostsApproval', false) Posts.getDefaultStatus = function (user) { ======= Posts.getDefaultStatus = function (user: DbUser): number { >>>>>>> const postsRequireApprovalSetting = new DatabasePublicSetting<boolean>('forum.requirePostsApproval', false) Posts.getDefaultStatus = function (user: DbUser): number { <<<<<<< const twitterAccountSetting = new DatabasePublicSetting<string | null>('twitterAccount', null) Posts.getTwitterShareUrl = post => { const via = twitterAccountSetting.get() ? `&via=${twitterAccountSetting.get()}` : ''; ======= Posts.getTwitterShareUrl = (post: DbPost): string => { const via = getSetting('twitterAccount', null) ? `&via=${getSetting('twitterAccount')}` : ''; >>>>>>> const twitterAccountSetting = new DatabasePublicSetting<string | null>('twitterAccount', null) Posts.getTwitterShareUrl = (post: DbPost): string => { const via = twitterAccountSetting.get() ? `&via=${twitterAccountSetting.get()}` : ''; <<<<<<< Posts.getLastCommentedAt = (post) => { if (forumTypeSetting.get() === 'AlignmentForum') { ======= Posts.getLastCommentedAt = (post: PostsBase|DbPost): Date => { if (getSetting('forumType') === 'AlignmentForum') { >>>>>>> Posts.getLastCommentedAt = (post: PostsBase|DbPost): Date => { if (forumTypeSetting.get() === 'AlignmentForum') { <<<<<<< Posts.getKarma = (post) => { const baseScore = forumTypeSetting.get() === 'AlignmentForum' ? post.afBaseScore : post.baseScore ======= Posts.getKarma = (post: PostsBase|DbPost): number => { const baseScore = getSetting('forumType') === 'AlignmentForum' ? post.afBaseScore : post.baseScore >>>>>>> Posts.getKarma = (post: PostsBase|DbPost): number => { const baseScore = forumTypeSetting.get() === 'AlignmentForum' ? post.afBaseScore : post.baseScore
<<<<<<< update: (selector?: string|MongoSelector<T>, modifier?: MongoModifier<T>, options?: MongoUpdateOptions<T>) => Promise<number> remove: any insert: any aggregate: any ======= update: (selector?: string|MongoSelector<T>, modifier?: MongoModifier<T>, options?: MongoUpdateOptions<T>) => number remove: (idOrSelector: string|MongoSelector<T>, options?: any) => void insert: (data: any, options?: any) => string aggregate: (aggregationPipeline: MongoAggregationPipeline<T>) => any >>>>>>> update: (selector?: string|MongoSelector<T>, modifier?: MongoModifier<T>, options?: MongoUpdateOptions<T>) => Promise<number> remove: (idOrSelector: string|MongoSelector<T>, options?: any) => void insert: (data: any, options?: any) => string aggregate: (aggregationPipeline: MongoAggregationPipeline<T>) => any
<<<<<<< export interface MutationOptions<T extends DbObject> { newCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, createCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, editCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, updateCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, removeCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, deleteCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, create?: boolean, update?: boolean, upsert?: boolean, delete?: boolean, } ======= export interface MutationOptions<T extends DbObject> { create?: boolean update?: boolean upsert?: boolean delete?: boolean newCheck?: (user: DbUser|null, docment: T|null) => boolean|Promise<boolean> editCheck?: (user: DbUser|null, docment: T|null) => boolean|Promise<boolean> removeCheck?: (user: DbUser|null, docment: T|null) => boolean|Promise<boolean> } >>>>>>> export interface MutationOptions<T extends DbObject> { newCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, editCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, removeCheck?: (user: DbUser|null, document: T|null) => Promise<boolean>|boolean, create?: boolean, update?: boolean, upsert?: boolean, delete?: boolean, } <<<<<<< export function getDefaultMutations<N extends CollectionNameString>(collectionName: N, options?: MutationOptions<ObjectsByCollectionName[N]>) { type T = ObjectsByCollectionName[N] const typeName = getTypeName(collectionName); const mutationOptions: MutationOptions<T> = {...defaultOptions, ...options}; ======= export function getDefaultMutations<N extends CollectionNameString>(collectionName: N, options?: MutationOptions<ObjectsByCollectionName[N]>) { type T = ObjectsByCollectionName[N]; const typeName = getTypeName(collectionName); const mutationOptions: MutationOptions<T> = { ...defaultOptions, ...options }; >>>>>>> export function getDefaultMutations<N extends CollectionNameString>(collectionName: N, options?: MutationOptions<ObjectsByCollectionName[N]>) { type T = ObjectsByCollectionName[N]; const typeName = getTypeName(collectionName); const mutationOptions: MutationOptions<T> = {...defaultOptions, ...options}; <<<<<<< async check(user: DbUser|null, document: T|null): Promise<boolean> { ======= async check(user: DbUser|null, document: T|null) { >>>>>>> async check(user: DbUser|null, document: T|null): Promise<boolean> { <<<<<<< async mutation(root: void, { selector }, context: ResolverContext) { ======= async mutation(root, { selector }, context: ResolverContext) { >>>>>>> async mutation(root: void, { selector }, context: ResolverContext) {
<<<<<<< import Users from '../../lib/collections/users/collection'; import { editableCollections, editableCollectionsFields } from '../../lib/editor/make_editable'; ======= import { accessFilterSingle } from '../../lib/utils/schemaUtils'; >>>>>>> import { editableCollections, editableCollectionsFields } from '../../lib/editor/make_editable'; import { accessFilterSingle } from '../../lib/utils/schemaUtils'; <<<<<<< // Validate collectionName, fieldName if (!editableCollections.has(collectionName)) { throw new Error(`Invalid collection for RevisionsDiff: ${collectionName}`); } if (!editableCollectionsFields[collectionName].find(f=>f===fieldName)) { throw new Error(`Invalid field for RevisionsDiff: ${collectionName}.${fieldName}`); } const collection = context[collectionName]; const documentUnfiltered = await collection.loader.load(id); // Check that the user has access to the document const document = Users.restrictViewableFields(currentUser, collection, documentUnfiltered); if (!document) { throw new Error(`Could not find document: ${id}`); } ======= // Check that the user has access to the post const post = accessFilterSingle(currentUser, Posts, postUnfiltered); if (!post) return null; >>>>>>> // Validate collectionName, fieldName if (!editableCollections.has(collectionName)) { throw new Error(`Invalid collection for RevisionsDiff: ${collectionName}`); } if (!editableCollectionsFields[collectionName].find(f=>f===fieldName)) { throw new Error(`Invalid field for RevisionsDiff: ${collectionName}.${fieldName}`); } const collection = context[collectionName]; const documentUnfiltered = await collection.loader.load(id); // Check that the user has access to the document const document = await accessFilterSingle(currentUser, collection, documentUnfiltered); if (!document) { throw new Error(`Could not find document: ${id}`); } <<<<<<< const before: DbRevision|null = Users.restrictViewableFields(currentUser, Revisions, beforeUnfiltered); const after: DbRevision|null = Users.restrictViewableFields(currentUser, Revisions, afterUnfiltered); if (!before || !beforeUnfiltered) { throw new Error(`Could not find revision: ${beforeRev}`); } if (!after || !afterUnfiltered) { throw new Error(`Could not find revision: ${afterRev}`); } ======= if (!beforeUnfiltered || !afterUnfiltered) return null const before: DbRevision|null = accessFilterSingle(currentUser, Revisions, beforeUnfiltered); const after: DbRevision|null = accessFilterSingle(currentUser, Revisions, afterUnfiltered); if (!before || !after) return null; >>>>>>> const before: DbRevision|null = await accessFilterSingle(currentUser, Revisions, beforeUnfiltered); const after: DbRevision|null = await accessFilterSingle(currentUser, Revisions, afterUnfiltered); if (!before || !beforeUnfiltered) { throw new Error(`Could not find revision: ${beforeRev}`); } if (!after || !afterUnfiltered) { throw new Error(`Could not find revision: ${afterRev}`); }
<<<<<<< readonly group: PostsBase_group|null, readonly bestAnswer: CommentsList|null, ======= readonly group: PostsBase_group, >>>>>>> readonly group: PostsBase_group|null, <<<<<<< interface PostsList extends PostsBase, PostsAuthors { // fragment on Posts readonly contents: PostsList_contents|null, readonly moderationGuidelines: PostsList_moderationGuidelines|null, readonly customHighlight: PostsList_customHighlight|null, ======= interface PostsListBase extends PostsBase, PostsAuthors { // fragment on Posts readonly moderationGuidelines: PostsListBase_moderationGuidelines, readonly customHighlight: PostsListBase_customHighlight, readonly lastPromotedComment: CommentsList, readonly bestAnswer: CommentsList, >>>>>>> interface PostsListBase extends PostsBase, PostsAuthors { // fragment on Posts readonly moderationGuidelines: PostsListBase_moderationGuidelines|null, readonly customHighlight: PostsListBase_customHighlight|null, readonly lastPromotedComment: CommentsList|null, readonly bestAnswer: CommentsList|null, <<<<<<< readonly contents: RevisionDisplay|null, readonly tags: Array<TagPreviewFragment>, ======= readonly contents: RevisionDisplay, >>>>>>> readonly contents: RevisionDisplay|null,
<<<<<<< ======= import urlObject from 'url'; import getSlug from 'speakingurl'; import { getSetting, registerSetting } from './settings'; >>>>>>> <<<<<<< Utils.getSiteUrl = function () { let url = siteUrlSetting.get(); ======= Utils.getSiteUrl = function (): string { let url = getSetting('siteUrl', Meteor.absoluteUrl()); >>>>>>> Utils.getSiteUrl = function (): string { let url = siteUrlSetting.get(); <<<<<<< Utils.getLogoUrl = () => { const logoUrl = logoUrlSetting.get() ======= Utils.getLogoUrl = (): string|undefined => { const logoUrl = getSetting<string|null>('logoUrl'); >>>>>>> Utils.getLogoUrl = (): string|undefined => { const logoUrl = logoUrlSetting.get()