conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
},
{
path: 'gridColumnGroups',
component: GridColumnGroupsSampleComponent
=======
},
{
path: 'gridGroupBy',
component: GridGroupBySampleComponent
>>>>>>>
},
{
path: 'gridColumnGroups',
component: GridColumnGroupsSampleComponent
},
{
path: 'gridGroupBy',
component: GridGroupBySampleComponent |
<<<<<<<
import { IgxInputModule } from "../directives/input/input.directive";
/**
* **Ignite UI for Angular Date Picker** - [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/date_picker.html)
* The Ignite UI Date Picker displays a popup calendar that lets users select a single date.
*
* Example:
* ```html
* <igx-datePicker [(ngModel)]="selectedDate"></igx-datePicker>
* ```
*/
=======
import { IgxIconModule } from "../icon";
import { IgxInputGroupModule } from "../input-group/input-group.component";
>>>>>>>
import { IgxIconModule } from "../icon";
import { IgxInputGroupModule } from "../input-group/input-group.component";
/**
* **Ignite UI for Angular Date Picker** - [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/date_picker.html)
* The Ignite UI Date Picker displays a popup calendar that lets users select a single date.
*
* Example:
* ```html
* <igx-datePicker [(ngModel)]="selectedDate"></igx-datePicker>
* ```
*/ |
<<<<<<<
} from "./grid.common";
import { IgxGridComponent } from "./grid.component";
import {
IgxGridFilterConditionPipe,
IgxGridFilteringPipe,
IgxGridPagingPipe,
IgxGridPostGroupingPipe,
IgxGridPreGroupingPipe,
IgxGridSortingPipe
} from "./grid.pipes";
import { IgxGridGroupByRowComponent } from "./groupby-row.component";
import { IgxGridRowComponent } from "./row.component";
=======
} from './grid.common';
import { IgxGridComponent } from './grid.component';
import { IgxGridFilterConditionPipe, IgxGridFilteringPipe, IgxGridGroupingPipe, IgxGridPagingPipe, IgxGridSortingPipe } from './grid.pipes';
import { IgxGridGroupByRowComponent } from './groupby-row.component';
import { IgxGridRowComponent } from './row.component';
>>>>>>>
} from './grid.common';
import { IgxGridComponent } from './grid.component';
import {
IgxGridFilterConditionPipe,
IgxGridFilteringPipe,
IgxGridPagingPipe,
IgxGridPostGroupingPipe,
IgxGridPreGroupingPipe,
IgxGridSortingPipe
} from './grid.pipes';
import { IgxGridGroupByRowComponent } from './groupby-row.component';
import { IgxGridRowComponent } from './row.component'; |
<<<<<<<
}
@Component({
template: `${GridTemplateStrings.declareGrid(`height="800px"`, '', ColumnDefinitions.multiColHeadersColumns)}`
})
export class MultiColumnHeadersComponent extends BasicGridComponent {
data = SampleTestData.contactInfoDataFull;
=======
}
@Component({
template: `${GridTemplateStrings.declareBasicGridWithColumns(ColumnDefinitions.nameAvatar)}`
})
export class GridWithAvatarComponent extends GridWithSizeComponent {
data = SampleTestData.personAvatarData;
height = '500px';
>>>>>>>
}
@Component({
template: `${GridTemplateStrings.declareGrid(`height="800px"`, '', ColumnDefinitions.multiColHeadersColumns)}`
})
export class MultiColumnHeadersComponent extends BasicGridComponent {
data = SampleTestData.contactInfoDataFull;
}
@Component({
template: `${GridTemplateStrings.declareBasicGridWithColumns(ColumnDefinitions.nameAvatar)}`
})
export class GridWithAvatarComponent extends GridWithSizeComponent {
data = SampleTestData.personAvatarData;
height = '500px'; |
<<<<<<<
public tfootHeight: number;
=======
public summariesHeight: number;
public cellInEditMode: IgxGridCellComponent;
>>>>>>>
public summariesHeight: number; |
<<<<<<<
export interface IGroupingDoneEventArgs {
=======
export interface IGridFocusChangeEventArgs extends IFocusChangeEventArgs {
groupRow: IgxGridGroupByRowComponent;
}
export interface IGroupingDoneEventArgs extends IBaseEventArgs {
>>>>>>>
export interface IGroupingDoneEventArgs extends IBaseEventArgs { |
<<<<<<<
=======
const GRID_HEADER_CLASS = '.igx-grid__thead-wrapper';
const GRID_SCROLL_CLASS = '.igx-grid__scroll';
>>>>>>>
<<<<<<<
const SUMMARY_CELL = 'igx-grid-summary-cell';
export const GRID_SCROLL_CLASS = 'igx-grid__scroll';
export const GRID_MRL_BLOCK_CLASS = 'igx-grid__mrl-block';
export const CELL_PINNED_CLASS = 'igx-grid__td--pinned';
export const HEADER_PINNED_CLASS = 'igx-grid__th--pinned';
export const GRID_HEADER_CLASS = '.igx-grid__thead-wrapper';
export const PINNED_SUMMARY = 'igx-grid-summary--pinned';
=======
const CELL_PINNED_CLASS = 'igx-grid__td--pinned';
const HEADER_PINNED_CLASS = 'igx-grid__th--pinned';
const COLUMN_HIDING_CLASS = 'igx-column-hiding';
const COLUMN_HIDING_INPUT_CLASS = '.igx-column-hiding__header-input';
const COLUMN_HIDING_COLUMNS_CLASS = '.igx-column-hiding__columns';
const COLUMN_PINNING_CLASS = 'igx-column-pinning';
>>>>>>>
const SUMMARY_CELL = 'igx-grid-summary-cell';
const COLUMN_HIDING_CLASS = 'igx-column-hiding';
const COLUMN_HIDING_INPUT_CLASS = '.igx-column-hiding__header-input';
const COLUMN_HIDING_COLUMNS_CLASS = '.igx-column-hiding__columns';
const COLUMN_PINNING_CLASS = 'igx-column-pinning';
export const GRID_SCROLL_CLASS = 'igx-grid__scroll';
export const GRID_MRL_BLOCK_CLASS = 'igx-grid__mrl-block';
export const CELL_PINNED_CLASS = 'igx-grid__td--pinned';
export const HEADER_PINNED_CLASS = 'igx-grid__th--pinned';
export const GRID_HEADER_CLASS = '.igx-grid__thead-wrapper';
export const PINNED_SUMMARY = 'igx-grid-summary--pinned'; |
<<<<<<<
import { verifyLayoutHeadersAreAligned, verifyDOMMatchesLayoutSettings } from '../../test-utils/helper-utils.spec';
=======
import { GridFunctions } from '../../test-utils/grid-functions.spec';
>>>>>>>
import { verifyLayoutHeadersAreAligned, verifyDOMMatchesLayoutSettings } from '../../test-utils/helper-utils.spec';
import { GridFunctions } from '../../test-utils/grid-functions.spec';
<<<<<<<
GridRowPinningWithMRLComponent,
=======
GridRowPinningWithMDVComponent,
>>>>>>>
GridRowPinningWithMRLComponent,
GridRowPinningWithMDVComponent,
<<<<<<<
@Component({
template: `
<igx-grid [data]="data" height="500px" [pinning]='pinningConfig'>
<igx-column-layout *ngFor='let group of colGroups'>
<igx-column *ngFor='let col of group.columns'
[rowStart]="col.rowStart" [colStart]="col.colStart" [width]='col.width'
[colEnd]="col.colEnd" [rowEnd]="col.rowEnd" [field]='col.field'></igx-column>
</igx-column-layout>
</igx-grid>
`
})
export class GridRowPinningWithMRLComponent extends GridRowPinningComponent {
cols: Array<any> = [
{ field: 'ID', rowStart: 1, colStart: 1 },
{ field: 'CompanyName', rowStart: 1, colStart: 2 },
{ field: 'ContactName', rowStart: 1, colStart: 3 },
{ field: 'ContactTitle', rowStart: 2, colStart: 1, rowEnd: 4, colEnd: 4 },
];
colGroups = [
{
group: 'group1',
columns: this.cols
}
];
}
=======
@Component({
template: `
<igx-grid
[pinning]='pinningConfig'
[width]='"800px"'
[height]='"500px"'
[data]="data"
[autoGenerate]="true">
<ng-template igxGridDetail let-dataItem>
<div>
<div><span class='categoryStyle'>Country:</span> {{dataItem.Country}}</div>
<div><span class='categoryStyle'>City:</span> {{dataItem.City}}</div>
<div><span class='categoryStyle'>Address:</span> {{dataItem.Address}}</div>
</div>
</ng-template>
</igx-grid>`
})
export class GridRowPinningWithMDVComponent extends GridRowPinningComponent {}
>>>>>>>
@Component({
template: `
<igx-grid [data]="data" height="500px" [pinning]='pinningConfig'>
<igx-column-layout *ngFor='let group of colGroups'>
<igx-column *ngFor='let col of group.columns'
[rowStart]="col.rowStart" [colStart]="col.colStart" [width]='col.width'
[colEnd]="col.colEnd" [rowEnd]="col.rowEnd" [field]='col.field'></igx-column>
</igx-column-layout>
</igx-grid>
`
})
export class GridRowPinningWithMRLComponent extends GridRowPinningComponent {
cols: Array<any> = [
{ field: 'ID', rowStart: 1, colStart: 1 },
{ field: 'CompanyName', rowStart: 1, colStart: 2 },
{ field: 'ContactName', rowStart: 1, colStart: 3 },
{ field: 'ContactTitle', rowStart: 2, colStart: 1, rowEnd: 4, colEnd: 4 },
];
colGroups = [
{
group: 'group1',
columns: this.cols
}
];
}
@Component({
template: `
<igx-grid
[pinning]='pinningConfig'
[width]='"800px"'
[height]='"500px"'
[data]="data"
[autoGenerate]="true">
<ng-template igxGridDetail let-dataItem>
<div>
<div><span class='categoryStyle'>Country:</span> {{dataItem.Country}}</div>
<div><span class='categoryStyle'>City:</span> {{dataItem.City}}</div>
<div><span class='categoryStyle'>Address:</span> {{dataItem.Address}}</div>
</div>
</ng-template>
</igx-grid>`
})
export class GridRowPinningWithMDVComponent extends GridRowPinningComponent {} |
<<<<<<<
import { HttpRequest, RouteParameters, QueryParameters } from '../../http.interface';
=======
import {
HttpRequest,
RouteParameters,
QueryParameters
} from '../../http.interface';
>>>>>>>
import { HttpRequest, QueryParameters, RouteParameters } from '../../http.interface';
<<<<<<<
import { queryParamsFactory } from "../../operators/queryParamsFactory/queryParams.factory";
import { urlParamsFactory } from './urlParams.factory';
=======
import { queryParamsFactory } from './queryParams.factory';
>>>>>>>
import { queryParamsFactory } from './queryParams.factory';
<<<<<<<
const reqMatched = (url: string, queryString = '', matchers: string[] = [], params: RouteParameters = {}, query?: QueryParameters) => {
const urlWithQuery = !!queryString ? `${url}?${queryString}` : url;
return {
url: urlWithQuery,
matchers,
params,
query: queryParamsFactory(urlWithQuery),
} as HttpRequest;
};
=======
const reqMatched = (
url: string,
queryString = '',
matchers: string[] = [],
params: RouteParameters = {},
query?: QueryParameters
) => {
const urlWithQuery = !!queryString ? `${url}?${queryString}` : url;
return {
url: urlWithQuery,
matchers,
params,
query: queryParamsFactory(urlWithQuery)
} as HttpRequest;
};
>>>>>>>
const reqMatched = (
url: string,
queryString = '',
matchers: string[] = [],
params: RouteParameters = {},
query?: QueryParameters
) => {
const urlWithQuery = !!queryString ? `${url}?${queryString}` : url;
return {
url: urlWithQuery,
matchers,
params,
query: queryParamsFactory(urlWithQuery)
} as any as HttpRequest;
}; |
<<<<<<<
@HostListener("contextmenu", ["$event"])
public onContextMenu(event) {
this.grid.onContextMenu.emit({
cell: this,
event
});
}
=======
@HostListener("click", ["$event"])
public onClick(event) {
this.grid.onCellClick.emit({
cell: this,
event
});
}
>>>>>>>
@HostListener("click", ["$event"])
public onClick(event) {
this.grid.onCellClick.emit({
cell: this,
event
});
}
@HostListener("contextmenu", ["$event"])
public onContextMenu(event) {
this.grid.onContextMenu.emit({
cell: this,
event
});
} |
<<<<<<<
private checkIfGridIsAdded(node): boolean {
if (node === this.nativeElement) {
return true;
} else {
for (const childNode of node.childNodes) {
const added = this.checkIfGridIsAdded(childNode);
if (added) {
return true;
}
}
return false;
}
}
=======
/**
* @hidden
*/
>>>>>>>
private checkIfGridIsAdded(node): boolean {
if (node === this.nativeElement) {
return true;
} else {
for (const childNode of node.childNodes) {
const added = this.checkIfGridIsAdded(childNode);
if (added) {
return true;
}
}
return false;
}
}
/**
* @hidden
*/ |
<<<<<<<
import { AbstractControl, ControlValueAccessor, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
import { Subscription, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { DisplayDensityToken, IDisplayDensityOptions } from '../core/density';
import { EditorProvider } from '../core/edit-provider';
import { IgxSelectionAPIService } from '../core/selection';
import { CancelableEventArgs } from '../core/utils';
import { IgxLabelDirective } from '../directives/label/label.directive';
import { IGX_DROPDOWN_BASE, ISelectionEventArgs, Navigate } from '../drop-down/drop-down.common';
import { IgxDropDownItemBaseDirective } from '../drop-down/index';
=======
import { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, AbstractControl } from '@angular/forms';
import { Subscription } from 'rxjs';
import { IgxDropDownItemBaseDirective } from '../drop-down/public_api';
>>>>>>>
import { AbstractControl, ControlValueAccessor, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { DisplayDensityToken, IDisplayDensityOptions } from '../core/density';
import { EditorProvider } from '../core/edit-provider';
import { IgxSelectionAPIService } from '../core/selection';
import { CancelableEventArgs } from '../core/utils';
import { IgxLabelDirective } from '../directives/label/label.directive';
import { IgxDropDownItemBaseDirective } from '../drop-down/drop-down-item.base';
import { IGX_DROPDOWN_BASE, ISelectionEventArgs, Navigate } from '../drop-down/drop-down.common';
<<<<<<<
=======
import { OverlaySettings, AbsoluteScrollStrategy } from '../services/public_api';
import { IGX_DROPDOWN_BASE, ISelectionEventArgs, Navigate } from '../drop-down/drop-down.common';
import { CancelableEventArgs } from '../core/utils';
import { IgxLabelDirective } from '../directives/label/label.directive';
>>>>>>> |
<<<<<<<
export interface IBaseChipEventArgs {
owner: IgxChipComponent;
}
export interface IChipClickEventArgs extends IBaseChipEventArgs {
cancel: boolean;
}
export interface IChipKeyDownEventArgs extends IChipClickEventArgs {
altKey: boolean;
shiftKey: boolean;
ctrlKey: boolean;
key: string;
}
export interface IChipEnterDragAreaEventArgs {
targetChip: IgxChipComponent;
dragChip: IgxChipComponent;
originalEvent: IgxDropEnterEventArgs;
}
=======
export interface IChipSelectEventArgs {
owner: IgxChipComponent;
cancel: boolean;
selected: boolean;
}
>>>>>>>
export interface IBaseChipEventArgs {
owner: IgxChipComponent;
}
export interface IChipClickEventArgs extends IBaseChipEventArgs {
cancel: boolean;
}
export interface IChipKeyDownEventArgs extends IChipClickEventArgs {
altKey: boolean;
shiftKey: boolean;
ctrlKey: boolean;
key: string;
}
export interface IChipEnterDragAreaEventArgs {
targetChip: IgxChipComponent;
dragChip: IgxChipComponent;
originalEvent: IgxDropEnterEventArgs;
}
export interface IChipSelectEventArgs {
owner: IgxChipComponent;
cancel: boolean;
selected: boolean;
} |
<<<<<<<
get maxLevelHeaderDepth() {
if (this._maxLevelHeaderDepth === null) {
this._maxLevelHeaderDepth = this.columnList.reduce((acc, col) => Math.max(acc, col.level), 0);
}
return this._maxLevelHeaderDepth;
}
=======
get hiddenColumnsCount() {
return this.columnList.filter((col) => col.hidden === true).length;
}
@Input()
get hiddenColumnsText() {
return this._hiddenColumnsText;
}
set hiddenColumnsText(value) {
this._hiddenColumnsText = value;
}
>>>>>>>
get maxLevelHeaderDepth() {
if (this._maxLevelHeaderDepth === null) {
this._maxLevelHeaderDepth = this.columnList.reduce((acc, col) => Math.max(acc, col.level), 0);
}
return this._maxLevelHeaderDepth;
}
get hiddenColumnsCount() {
return this.columnList.filter((col) => col.hidden === true).length;
}
@Input()
get hiddenColumnsText() {
return this._hiddenColumnsText;
}
set hiddenColumnsText(value) {
this._hiddenColumnsText = value;
}
<<<<<<<
protected _maxLevelHeaderDepth = null;
=======
protected _columnHiding = false;
>>>>>>>
protected _maxLevelHeaderDepth = null;
protected _columnHiding = false; |
<<<<<<<
<span igxButton routerLink="/dialog">Dialog</span>
=======
<span igxButton routerLink="/progressbar">Progressbar</span>
<span igxButton routerLink="/modal">Modal</span>
>>>>>>>
<span igxButton routerLink="/dialog">Dialog</span>
<span igxButton routerLink="/progressbar">Progressbar</span> |
<<<<<<<
import { ComboSampleComponent } from './combo/combo.sample';
=======
import { OverlaySampleComponent } from './overlay/overlay.sample';
>>>>>>>
import { ComboSampleComponent } from './combo/combo.sample';
import { OverlaySampleComponent } from './overlay/overlay.sample'; |
<<<<<<<
import { FilterPipe } from "../../src/list/filter-pipe";
=======
>>>>>>>
<<<<<<<
AvatarModule,
=======
FilterModule,
>>>>>>>
AvatarModule,
FilterModule, |
<<<<<<<
import { FilteringStrategy, IFilteringStrategy } from '../data-operations/filtering-strategy';
=======
import { IgxRowExpandedIndicatorDirective, IgxRowCollapsedIndicatorDirective,
IgxHeaderExpandIndicatorDirective, IgxHeaderCollapseIndicatorDirective } from './grid/grid.directives';
import { GridKeydownTargetType, GridSelectionMode, GridSummaryPosition, GridSummaryCalculationMode, FilterMode } from './common/enums';
>>>>>>>
import { IFilteringStrategy } from '../data-operations/filtering-strategy';
import { IgxRowExpandedIndicatorDirective, IgxRowCollapsedIndicatorDirective,
IgxHeaderExpandIndicatorDirective, IgxHeaderCollapseIndicatorDirective } from './grid/grid.directives';
import { GridKeydownTargetType, GridSelectionMode, GridSummaryPosition, GridSummaryCalculationMode, FilterMode } from './common/enums'; |
<<<<<<<
public pinRow(rowID, index?): boolean {
if (this._pinnedRecordIDs.indexOf(rowID) !== -1) {
=======
public pinRow(rowID: any, index?: number): boolean {
const rec = this.gridAPI.get_rec_by_id(rowID);
if (!rec || this.pinnedRecords.indexOf(rec) !== -1 || this.data.indexOf(rec) === -1) {
>>>>>>>
public pinRow(rowID: any, index?: number): boolean {
if (this._pinnedRecordIDs.indexOf(rowID) !== -1) {
<<<<<<<
public unpinRow(rowID) {
const index = this._pinnedRecordIDs.indexOf(rowID);
if (index === -1) {
=======
public unpinRow(rowID: any) {
const rec = this.gridAPI.get_rec_by_id(rowID);
const index = this.pinnedRecords.indexOf(rec);
if (index === -1 || !rec) {
>>>>>>>
public unpinRow(rowID: any) {
const index = this._pinnedRecordIDs.indexOf(rowID);
if (index === -1) { |
<<<<<<<
import { TooltipSampleComponent } from './tooltip/tooltip.sample';
=======
import { ExpansionPanelSampleComponent } from './expansion-panel/expansion-panel-sample';
>>>>>>>
import { TooltipSampleComponent } from './tooltip/tooltip.sample';
import { ExpansionPanelSampleComponent } from './expansion-panel/expansion-panel-sample'; |
<<<<<<<
=======
private get isFirstCell(): boolean {
return this.columnIndex === 0 || (this.isPinned && this.visibleColumnIndex === 0);
}
private get isLastCell(): boolean {
return this.columnIndex === this.grid.columns.length - 1 && !this.column.pinned;
}
>>>>>>>
<<<<<<<
private keydown$ = fromEvent(this.nativeElement, 'keydown')
.pipe(
tap((event: KeyboardEvent) => {
if (event.key === 'Tab') {
event.preventDefault();
}
if (this.gridAPI.get_cell_inEditMode(this.gridID)) {
event.stopPropagation();
return;
}
if (this.isNavigationKey(ev.key.toLowerCase())) {
event.preventDefault();
event.stopPropagation();
}
}),
takeUntil(this.destroy$),
sampleTime(0, rAF)
);
=======
private keydown$ = fromEvent(this.nativeElement, 'keydown').pipe(
tap((event: KeyboardEvent) => {
if (event.key === 'Tab') {
event.preventDefault();
}
}),
takeUntil(this.destroy$),
sampleTime(0, rAF));
>>>>>>>
private keydown$ = fromEvent(this.nativeElement, 'keydown')
.pipe(
tap((event: KeyboardEvent) => {
if (event.key === 'Tab') {
event.preventDefault();
}
if (this.gridAPI.get_cell_inEditMode(this.gridID)) {
event.stopPropagation();
return;
}
if (this.isNavigationKey(event.key.toLowerCase())) {
event.preventDefault();
event.stopPropagation();
}
}),
takeUntil(this.destroy$),
sampleTime(0, rAF)
);
<<<<<<<
this.onKeydownArrowUp();
=======
if (this.inEditMode) { return; }
this.onKeydownArrowUp(event);
>>>>>>>
this.onKeydownArrowUp(event);
<<<<<<<
this.onKeydownArrowDown();
=======
if (this.inEditMode) { return; }
this.onKeydownArrowDown(event);
>>>>>>>
this.onKeydownArrowDown(event);
<<<<<<<
public onShiftTabKey(event) {
this.onKeydownArrowLeft(event);
=======
public onShiftTabKey(event) {
if (this.isFirstCell) {
this.selection.clear(this.cellSelectionID);
this.grid.markForCheck();
return;
} else {
this.onKeydownArrowLeft(event);
}
>>>>>>>
public onShiftTabKey(event) {
this.onKeydownArrowLeft(event);
<<<<<<<
public onTabKey(event) {
this.onKeydownArrowRight(event);
=======
public onTabKey(event) {
if (this.isLastCell) {
this.selection.clear(this.cellSelectionID);
this.grid.markForCheck();
return;
} else {
this.onKeydownArrowRight(event);
}
>>>>>>>
public onTabKey(event) {
this.onKeydownArrowRight(event); |
<<<<<<<
it('should not add hammer.js if it exists in angular.json build options', () => {
=======
it('should not add hammer.js if it exists in angular.json', async () => {
>>>>>>>
it('should not add hammer.js if it exists in angular.json build options', async () => {
<<<<<<<
it('should add hammer.js to the test.ts file', () => {
runner.runSchematic('ng-add', { normalizeCss: false }, tree);
const testTs = tree.read(`${sourceRoot}/test.ts`).toString();
expect(testTs).toContain('import \'hammerjs\';');
});
it('should not add hammer.js if it exists in angular.json test options', () => {
const workspace = getWorkspace(tree) as any;
const currentProjectName = workspace.defaultProject;
workspace.projects[currentProjectName].architect.test.options.scripts.push('./node_modules/hammerjs/hammer.min.js');
tree.overwrite('angular.json', JSON.stringify(workspace));
runner.runSchematic('ng-add', { normalizeCss: false }, tree);
const testTs = tree.read(`${sourceRoot}/test.ts`).toString();
expect(testTs).toMatch('// test comment');
});
it('should not add hammer.js if it exists in main.ts', () => {
=======
it('should not add hammer.js if it exists in main.ts', async () => {
>>>>>>>
it('should add hammer.js to the test.ts file', async () => {
await runner.runSchematicAsync('ng-add', { normalizeCss: false }, tree).toPromise();
const testTs = tree.read(`${sourceRoot}/test.ts`).toString();
expect(testTs).toContain('import \'hammerjs\';');
});
it('should not add hammer.js if it exists in angular.json test options', async () => {
const workspace = getWorkspace(tree) as any;
const currentProjectName = workspace.defaultProject;
workspace.projects[currentProjectName].architect.test.options.scripts.push('./node_modules/hammerjs/hammer.min.js');
tree.overwrite('angular.json', JSON.stringify(workspace));
await runner.runSchematicAsync('ng-add', { normalizeCss: false }, tree).toPromise();
const testTs = tree.read(`${sourceRoot}/test.ts`).toString();
expect(testTs).toMatch('// test comment');
});
it('should not add hammer.js if it exists in main.ts', async () => { |
<<<<<<<
import * as jsxc from './api/v1/index'
=======
import * as jsxc from './api/v1'
import Client from './Client';
>>>>>>>
import * as jsxc from './api/v1/index'
import Client from './Client'; |
<<<<<<<
import { start } from '../../api/v1/index'
=======
import { start } from '../../api/v1'
import { usernameToJabberId } from '@src/FormWatcher';
>>>>>>>
import { start } from '../../api/v1/index'
import { usernameToJabberId } from '@src/FormWatcher'; |
<<<<<<<
Workflow = "Workflow",
=======
Commandline = "Commandline",
>>>>>>>
Workflow = "Workflow",
Commandline = "Commandline", |
<<<<<<<
<workflow-settings :config="config" :translations="translations"></workflow-settings>
=======
<commandline-settings :config="config" :translations="translations"></commandline-settings>
>>>>>>>
<workflow-settings :config="config" :translations="translations"></workflow-settings>
<commandline-settings :config="config" :translations="translations"></commandline-settings> |
<<<<<<<
import { defaultDictionaryOptions, DictionaryOptions } from "./dictionary-options";
=======
import { BrowserBookmarksOptions, defaultBrowserBookmarksOptions } from "./browser-bookmarks-options";
>>>>>>>
import { defaultDictionaryOptions, DictionaryOptions } from "./dictionary-options";
import { BrowserBookmarksOptions, defaultBrowserBookmarksOptions } from "./browser-bookmarks-options"; |
<<<<<<<
import { workflowSettingsComponent } from "./settings/workflow-settings-component";
import { workflowEditingModal } from "./settings/modals/workflow-editing-modal-component";
=======
import { commandlineSettingsComponent } from "./settings/commandline-settings-component";
>>>>>>>
import { workflowSettingsComponent } from "./settings/workflow-settings-component";
import { workflowEditingModal } from "./settings/modals/workflow-editing-modal-component";
import { commandlineSettingsComponent } from "./settings/commandline-settings-component";
<<<<<<<
Vue.component("workflow-settings", workflowSettingsComponent);
Vue.component("workflow-editing-modal", workflowEditingModal);
=======
Vue.component("commandline-settings", commandlineSettingsComponent);
>>>>>>>
Vue.component("workflow-settings", workflowSettingsComponent);
Vue.component("workflow-editing-modal", workflowEditingModal);
Vue.component("commandline-settings", commandlineSettingsComponent); |
<<<<<<<
Workflow = "Workflow",
=======
Commandline = "Commandline",
>>>>>>>
Workflow = "Workflow",
Commandline = "Commandline", |
<<<<<<<
import { FileHelpers } from "./helpers/file-helpers";
import { ueliTempFolder } from "../common/helpers/ueli-helpers";
if (!FileHelpers.fileExistsSync(ueliTempFolder)) {
FileHelpers.createFolderSync(ueliTempFolder);
}
=======
import { getProductionTranslationManager } from "./production/production-translation-manager";
import { TranslationKey } from "../common/translation/translation-key";
>>>>>>>
import { FileHelpers } from "./helpers/file-helpers";
import { ueliTempFolder } from "../common/helpers/ueli-helpers";
import { getProductionTranslationManager } from "./production/production-translation-manager";
import { TranslationKey } from "../common/translation/translation-key";
if (!FileHelpers.fileExistsSync(ueliTempFolder)) {
FileHelpers.createFolderSync(ueliTempFolder);
} |
<<<<<<<
outputContainerHeight: (): string => {
return `height: calc(100vh - ${Config.userInputHeight}px);`;
},
searchResultExecutionArgumentStyle: (): string => {
return `font-size: ${Config.searchResultExecutionArgumentFontSize}px;`;
},
searchResultHeight: (): string => {
return `height: ${Config.searchResultHeight}px`;
},
searchResultNameStyle: (): string => {
return `font-size: ${Config.searchResultNameFontSize}px;`;
},
searchResultWidth: (): string => {
return `width: ${Config.searchResultHeight}px;`;
},
userInputContainerStyle: (): string => {
return `height: ${Config.userInputHeight}px;`;
},
userInputStyle: (): string => {
return `font-size: ${Config.userInputFontSize}px;`;
},
=======
handleMouseMove: (event: MouseEvent): void => {
if (event.movementX !== 0 || event.movementY !== 0) {
vue.isMouseMoving = true;
}
},
handleMouseOver: (index: number): void => {
if (vue.isMouseMoving) {
vue.isMouseMoving = false;
vue.searchResults.forEach((searchResultItem: SearchResultItemViewModel) => {
searchResultItem.active = false;
});
vue.searchResults[index].active = true;
}
},
>>>>>>>
handleMouseMove: (event: MouseEvent): void => {
if (event.movementX !== 0 || event.movementY !== 0) {
vue.isMouseMoving = true;
}
},
handleMouseOver: (index: number): void => {
if (vue.isMouseMoving) {
vue.isMouseMoving = false;
vue.searchResults.forEach((searchResultItem: SearchResultItemViewModel) => {
searchResultItem.active = false;
});
vue.searchResults[index].active = true;
}
},
outputContainerHeight: (): string => {
return `height: calc(100vh - ${Config.userInputHeight}px);`;
},
searchResultExecutionArgumentStyle: (): string => {
return `font-size: ${Config.searchResultExecutionArgumentFontSize}px;`;
},
searchResultHeight: (): string => {
return `height: ${Config.searchResultHeight}px`;
},
searchResultNameStyle: (): string => {
return `font-size: ${Config.searchResultNameFontSize}px;`;
},
searchResultWidth: (): string => {
return `width: ${Config.searchResultHeight}px;`;
},
userInputContainerStyle: (): string => {
return `height: ${Config.userInputHeight}px;`;
},
userInputStyle: (): string => {
return `font-size: ${Config.userInputFontSize}px;`;
}, |
<<<<<<<
import { FirefoxBookmarkRepository } from "../plugins/browser-bookmarks-plugin/firefox-bookmark-repository";
=======
import { ChromiumBookmarkRepository } from "../plugins/browser-bookmarks-plugin/chromium-bookmark-repository";
>>>>>>>
import { FirefoxBookmarkRepository } from "../plugins/browser-bookmarks-plugin/firefox-bookmark-repository";
import { ChromiumBookmarkRepository } from "../plugins/browser-bookmarks-plugin/chromium-bookmark-repository";
<<<<<<<
const firefoxUserDataFolderPath = operatingSystem === OperatingSystem.Windows
? `${homedir()}\\AppData\\Roaming\\Mozilla\\Firefox`
: `${homedir()}/Library/Application\ Support/Firefox`;
=======
const chromiumBookmarksFilePath = operatingSystem === OperatingSystem.Windows
? `${homedir()}\\AppData\\Local\\Chromium\\User Data\\Default\\Bookmarks`
: `${homedir()}/Library/Application\ Support/Chromium/Default/Bookmarks`;
>>>>>>>
const firefoxUserDataFolderPath = operatingSystem === OperatingSystem.Windows
? `${homedir()}\\AppData\\Roaming\\Mozilla\\Firefox`
: `${homedir()}/Library/Application\ Support/Firefox`;
const chromiumBookmarksFilePath = operatingSystem === OperatingSystem.Windows
? `${homedir()}\\AppData\\Local\\Chromium\\User Data\\Default\\Bookmarks`
: `${homedir()}/Library/Application\ Support/Chromium/Default/Bookmarks`;
<<<<<<<
new FirefoxBookmarkRepository(firefoxUserDataFolderPath),
=======
new ChromiumBookmarkRepository(chromiumBookmarksFilePath),
>>>>>>>
new FirefoxBookmarkRepository(firefoxUserDataFolderPath),
new GoogleChromeBookmarkRepository(chromeBookmarksFilePath),
new SideKickBookmarkRepository(sideKickBookmarkFilePath),
new VivaldiBookmarkRepository(vivaldiBookmarksFilePath), |
<<<<<<<
import { spanishTranslationSet } from "./spanish-translation-set";
=======
import { chineseTranslationSet } from "./chinese-translation-set";
>>>>>>>
import { spanishTranslationSet } from "./spanish-translation-set";
import { chineseTranslationSet } from "./chinese-translation-set";
<<<<<<<
case Language.Spanish:
return spanishTranslationSet;
=======
case Language.Chinese:
return chineseTranslationSet;
>>>>>>>
case Language.Spanish:
return spanishTranslationSet;
case Language.Chinese:
return chineseTranslationSet; |
<<<<<<<
import { ProductionApplicationRepository } from "../plugins/application-search-plugin/production-application-repository";
import { defaultWindowsAppIcon, defaultMacOsAppIcon } from "../../common/icon/default-icons";
import { ApplicationIconService } from "../plugins/application-search-plugin/application-icon-service";
import { generateWindowsAppIcons } from "../plugins/application-search-plugin/windows-app-icon-generator";
import { windowsFileSearcher as powershellFileSearcher, macosFileSearcher } from "../executors/file-searchers";
import { searchWindowsApplications, searchMacApplications } from "../executors/application-searcher";
import { generateMacAppIcons } from "../plugins/application-search-plugin/mac-os-app-icon-generator";
import { DictionaryPlugin } from "../plugins/dictionary-plugin/dictionary-plugin";
=======
import { BrowserBookmarksPlugin } from "../plugins/browser-bookmarks-plugin/browser-bookmarks-plugin";
import { GoogleChromeBookmarkRepository } from "../plugins/browser-bookmarks-plugin/google-chrome-bookmark-repository";
>>>>>>>
import { ProductionApplicationRepository } from "../plugins/application-search-plugin/production-application-repository";
import { defaultWindowsAppIcon, defaultMacOsAppIcon } from "../../common/icon/default-icons";
import { ApplicationIconService } from "../plugins/application-search-plugin/application-icon-service";
import { generateWindowsAppIcons } from "../plugins/application-search-plugin/windows-app-icon-generator";
import { windowsFileSearcher as powershellFileSearcher, macosFileSearcher } from "../executors/file-searchers";
import { searchWindowsApplications, searchMacApplications } from "../executors/application-searcher";
import { generateMacAppIcons } from "../plugins/application-search-plugin/mac-os-app-icon-generator";
import { DictionaryPlugin } from "../plugins/dictionary-plugin/dictionary-plugin";
import { BrowserBookmarksPlugin } from "../plugins/browser-bookmarks-plugin/browser-bookmarks-plugin";
import { GoogleChromeBookmarkRepository } from "../plugins/browser-bookmarks-plugin/google-chrome-bookmark-repository";
<<<<<<<
const applicationSearcher = isWindows(platform()) ? searchWindowsApplications : searchMacApplications;
const appIconGenerator = isWindows(platform()) ? generateWindowsAppIcons : generateMacAppIcons;
const defaultAppIcon = isWindows(platform()) ? defaultWindowsAppIcon : defaultMacOsAppIcon;
const fileSearcher = isWindows(platform()) ? powershellFileSearcher : macosFileSearcher;
=======
const chromeBookmarksFilePath = isWindows(platform())
? `${homedir()}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks`
: `${homedir()}/Library/Application\ Support/Google/Chrome/Default/Bookmarks`;
>>>>>>>
const applicationSearcher = isWindows(platform()) ? searchWindowsApplications : searchMacApplications;
const appIconGenerator = isWindows(platform()) ? generateWindowsAppIcons : generateMacAppIcons;
const defaultAppIcon = isWindows(platform()) ? defaultWindowsAppIcon : defaultMacOsAppIcon;
const fileSearcher = isWindows(platform()) ? powershellFileSearcher : macosFileSearcher;
const chromeBookmarksFilePath = isWindows(platform())
? `${homedir()}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks`
: `${homedir()}/Library/Application\ Support/Google/Chrome/Default/Bookmarks`;
<<<<<<<
defaultAppIcon,
new ApplicationIconService(appIconGenerator, logger),
applicationSearcher,
),
=======
logger,
),
>>>>>>>
defaultAppIcon,
new ApplicationIconService(
appIconGenerator,
logger,
),
applicationSearcher,
), |
<<<<<<<
workflows: "Workflows",
workflowSettingsDescription: "This plugin enables you to quickly execute multiple things at once.",
workflowSettingsAddWorkflow: "Add workflow",
workflowName: "Name",
workflowDescription: "Description",
workflowTags: "Tags",
workflowIcon: "Icon",
workflowExecutionSteps: "Execution steps",
=======
commandline: "Commandline",
commandlinePrefix: "Prefix",
commandlineSettingsDescription: "This plugin enables you to quickly execute commandline commands.",
>>>>>>>
workflows: "Workflows",
workflowSettingsDescription: "This plugin enables you to quickly execute multiple things at once.",
workflowSettingsAddWorkflow: "Add workflow",
workflowName: "Name",
workflowDescription: "Description",
workflowTags: "Tags",
workflowIcon: "Icon",
workflowExecutionSteps: "Execution steps",
commandline: "Commandline",
commandlinePrefix: "Prefix",
commandlineSettingsDescription: "This plugin enables you to quickly execute commandline commands.", |
<<<<<<<
Dictionary = "dictionary",
=======
BrowserBookmarks = "browser-bookmarks",
>>>>>>>
Dictionary = "dictionary",
BrowserBookmarks = "browser-bookmarks", |
<<<<<<<
// console.log('test', __WORKER__);
// 写入2个测试 cookie
document.cookie = 'xsrf=alloy,token=worker';
/** worker url 会在构建时替换到 html 中的全局变量
* <script>window.__globalWorkerFilePath = 'WORKER_FILE_NAME_PLACEHOLDER'</script>
* 'WORKER_FILE_NAME_PLACEHOLDER' -> 'alloy-worker-51497b48.js'
*/
const workerUrl: string = window.__globalWorkerFilePath;
=======
>>>>>>>
// 写入2个测试 cookie
document.cookie = 'xsrf=alloy,token=worker'; |
<<<<<<<
import Cookie from './cookie';
=======
import WorkerReport from './worker-report';
>>>>>>>
import WorkerReport from './worker-report';
import Cookie from './cookie';
<<<<<<<
cookie: Cookie;
=======
workerReport: WorkerReport;
>>>>>>>
workerReport: WorkerReport;
cookie: Cookie;
<<<<<<<
this.cookie = new Cookie(this.controller);
=======
this.workerReport = new WorkerReport(this.controller);
>>>>>>>
this.workerReport = new WorkerReport(this.controller);
this.cookie = new Cookie(this.controller); |
<<<<<<<
messageTestHandler(payload: WorkerAbilityTestPayload.IMessageTest) {
WorkerThreadWorker.cookie.getCookie();
=======
/**
* 通信能力检测的处理器
*/
private CommunicationTestHandler(payload: WorkerPayload.WorkerAbilityTest.ICommunicationTest) {
>>>>>>>
/**
* 通信能力检测的处理器
*/
private CommunicationTestHandler(payload: WorkerPayload.WorkerAbilityTest.ICommunicationTest) {
WorkerThreadWorker.cookie.getCookie(); |
<<<<<<<
import { SeverityTableRow } from '../components/Main/Scenario/ScenarioTypes'
import { collectTotals, evolve, getPopulationParams, initializePopulation } from './model'
import { AgeDistribution, AllParamsFlat, MitigationIntervals } from './types/Param.types'
import { AlgorithmResult, SimulationTimePoint } from './types/Result.types'
import { TimeSeries } from './types/TimeSeries.types'
=======
import { AgeDistribution } from '../.generated/types'
import { SeverityTableRow } from '../components/Main/Scenario/SeverityTable'
import { AllParamsFlat } from './types/Param.types'
import { AlgorithmResult, SimulationTimePoint, ExportedTimePoint } from './types/Result.types'
import { getPopulationParams, initializePopulation } from './initialize'
import { collectTotals, evolve } from './model'
import { mulTP, divTP, meanTrajectory, stddevTrajectory } from './results'
>>>>>>>
import { AgeDistribution } from '../.generated/types'
import { SeverityTableRow } from '../components/Main/Scenario/ScenarioTypes'
import { AllParamsFlat } from './types/Param.types'
import { AlgorithmResult, SimulationTimePoint, ExportedTimePoint } from './types/Result.types'
import { getPopulationParams, initializePopulation } from './initialize'
import { collectTotals, evolve } from './model'
import { mulTP, divTP, meanTrajectory, stddevTrajectory } from './results'
<<<<<<<
ageDistribution: AgeDistribution,
containment: TimeSeries,
=======
ageDistribution: AgeDistribution,
>>>>>>>
ageDistribution: AgeDistribution,
<<<<<<<
const initialCases = params.initialNumberOfCases
let initialState = initializePopulation(modelParams.populationServed, initialCases, tMin, ageDistribution)
=======
const initialCases = params.suspectedCasesToday
>>>>>>>
const initialCases = params.initialNumberOfCases |
<<<<<<<
dryRun: false,
outputPath:undefined,
=======
dryRun: false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun: false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun:false,
outputPath:undefined,
=======
dryRun:false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun:false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun:false,
outputPath:undefined,
=======
dryRun:false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun:false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun:false,
outputPath:undefined,
=======
dryRun:false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun:false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun:true,
outputPath:undefined,
=======
dryRun:true,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun:true,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun:false,
outputPath:undefined,
=======
dryRun:false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun:false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun: false,
outputPath:undefined,
=======
dryRun: false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
>>>>>>>
dryRun: false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
<<<<<<<
dryRun: false,
outputPath:undefined,
});
expect(parsedArgs).toEqualJSON(expectedResult);
});
it('includes an output directory when --output-path is passed', function() {
const args:string[] = ['--output-path=path/to/output', 'project/to/generate'];
const parsedArgs:Maybe.Maybe<CommandLine.Arguments> = CommandLine.parseArgs(args);
const expectedResult = Maybe.Just<CommandLine.Arguments>({
givenPath:'project/to/generate',
adtConfigPath:undefined,
valueObjectConfigPath:undefined,
objectConfigPath:undefined,
interestedLoggingTypes:List.of(Logging.LoggingType.info, Logging.LoggingType.error),
minimalLevel:10,
dryRun: false,
outputPath:'path/to/output',
=======
dryRun: false,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
});
expect(parsedArgs).toEqualJSON(expectedResult);
});
it('includes a list of includes and excludes if specified', function() {
const args:string[] = ['project/to/generate', '--include=PluginOne', '--include=PluginTwo', '--exclude=PluginThree'];
const parsedArgs:Maybe.Maybe<CommandLine.Arguments> = CommandLine.parseArgs(args);
const expectedResult = Maybe.Just<CommandLine.Arguments>({
givenPath:'project/to/generate',
adtConfigPath:undefined,
valueObjectConfigPath:undefined,
objectConfigPath:undefined,
interestedLoggingTypes:List.of(Logging.LoggingType.info, Logging.LoggingType.error),
minimalLevel:10,
dryRun: false,
includes:['PluginOne', 'PluginTwo'],
excludes:['PluginThree'],
prohibitPluginDirectives:false,
});
expect(parsedArgs).toEqualJSON(expectedResult);
});
it('sets flag to prohibit embedded plugin includes/excludes if passed flag', function() {
const args:string[] = ['project/to/generate', '--prohibit-plugin-directives'];
const parsedArgs:Maybe.Maybe<CommandLine.Arguments> = CommandLine.parseArgs(args);
const expectedResult = Maybe.Just<CommandLine.Arguments>({
givenPath:'project/to/generate',
adtConfigPath:undefined,
valueObjectConfigPath:undefined,
objectConfigPath:undefined,
interestedLoggingTypes:List.of(Logging.LoggingType.info, Logging.LoggingType.error),
minimalLevel:10,
dryRun: false,
includes:[],
excludes:[],
prohibitPluginDirectives:true,
>>>>>>>
dryRun: false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:false,
});
expect(parsedArgs).toEqualJSON(expectedResult);
});
it('includes an output directory when --output-path is passed', function() {
const args:string[] = ['--output-path=path/to/output', 'project/to/generate'];
const parsedArgs:Maybe.Maybe<CommandLine.Arguments> = CommandLine.parseArgs(args);
const expectedResult = Maybe.Just<CommandLine.Arguments>({
givenPath:'project/to/generate',
adtConfigPath:undefined,
valueObjectConfigPath:undefined,
objectConfigPath:undefined,
interestedLoggingTypes:List.of(Logging.LoggingType.info, Logging.LoggingType.error),
minimalLevel:10,
dryRun: false,
outputPath:'path/to/output',
includes:[],
excludes:[],
prohibitPluginDirectives:false,
});
expect(parsedArgs).toEqualJSON(expectedResult);
});
it('includes a list of includes and excludes if specified', function() {
const args:string[] = ['project/to/generate', '--include=PluginOne', '--include=PluginTwo', '--exclude=PluginThree'];
const parsedArgs:Maybe.Maybe<CommandLine.Arguments> = CommandLine.parseArgs(args);
const expectedResult = Maybe.Just<CommandLine.Arguments>({
givenPath:'project/to/generate',
adtConfigPath:undefined,
valueObjectConfigPath:undefined,
objectConfigPath:undefined,
interestedLoggingTypes:List.of(Logging.LoggingType.info, Logging.LoggingType.error),
minimalLevel:10,
dryRun: false,
outputPath:undefined,
includes:['PluginOne', 'PluginTwo'],
excludes:['PluginThree'],
prohibitPluginDirectives:false,
});
expect(parsedArgs).toEqualJSON(expectedResult);
});
it('sets flag to prohibit embedded plugin includes/excludes if passed flag', function() {
const args:string[] = ['project/to/generate', '--prohibit-plugin-directives'];
const parsedArgs:Maybe.Maybe<CommandLine.Arguments> = CommandLine.parseArgs(args);
const expectedResult = Maybe.Just<CommandLine.Arguments>({
givenPath:'project/to/generate',
adtConfigPath:undefined,
valueObjectConfigPath:undefined,
objectConfigPath:undefined,
interestedLoggingTypes:List.of(Logging.LoggingType.info, Logging.LoggingType.error),
minimalLevel:10,
dryRun: false,
outputPath:undefined,
includes:[],
excludes:[],
prohibitPluginDirectives:true, |
<<<<<<<
hardenedRuntime?: boolean;
=======
'identity-validation'?: boolean;
>>>>>>>
hardenedRuntime?: boolean;
'identity-validation'?: boolean; |
<<<<<<<
const getContractsData = async (
reserve: string,
user: string,
testEnv: TestEnv,
sender?: string
) => {
=======
export const getContractsData = async (reserve: string, user: string, testEnv: TestEnv) => {
>>>>>>>
export const getContractsData = async (
reserve: string,
user: string,
testEnv: TestEnv,
sender?: string
) => { |
<<<<<<<
MockUniswapV2Router02Factory,
=======
MockStableDebtTokenFactory,
MockVariableDebtTokenFactory,
>>>>>>>
MockStableDebtTokenFactory,
MockVariableDebtTokenFactory,
MockUniswapV2Router02Factory,
<<<<<<<
);
export const getMockUniswapRouter = async (address?: tEthereumAddress) =>
await MockUniswapV2Router02Factory.connect(
address ||
(await getDb().get(`${eContractid.MockUniswapV2Router02}.${BRE.network.name}`).value())
.address,
await getFirstSigner()
);
export const getUniswapLiquiditySwapAdapter = async (address?: tEthereumAddress) =>
await UniswapLiquiditySwapAdapterFactory.connect(
address ||
(await getDb().get(`${eContractid.UniswapLiquiditySwapAdapter}.${BRE.network.name}`).value())
.address,
await getFirstSigner()
);
export const getUniswapRepayAdapter = async (address?: tEthereumAddress) =>
await UniswapRepayAdapterFactory.connect(
address ||
(await getDb().get(`${eContractid.UniswapRepayAdapter}.${BRE.network.name}`).value()).address,
await getFirstSigner()
=======
);
export const getMockAToken = async (address?: tEthereumAddress) =>
await MockATokenFactory.connect(
address || (await getDb().get(`${eContractid.MockAToken}.${BRE.network.name}`).value()).address,
await getFirstSigner()
);
export const getMockVariableDebtToken = async (address?: tEthereumAddress) =>
await MockVariableDebtTokenFactory.connect(
address ||
(await getDb().get(`${eContractid.MockVariableDebtToken}.${BRE.network.name}`).value())
.address,
await getFirstSigner()
);
export const getMockStableDebtToken = async (address?: tEthereumAddress) =>
await MockStableDebtTokenFactory.connect(
address ||
(await getDb().get(`${eContractid.MockStableDebtToken}.${BRE.network.name}`).value()).address,
await getFirstSigner()
>>>>>>>
);
export const getMockAToken = async (address?: tEthereumAddress) =>
await MockATokenFactory.connect(
address || (await getDb().get(`${eContractid.MockAToken}.${BRE.network.name}`).value()).address,
await getFirstSigner()
);
export const getMockVariableDebtToken = async (address?: tEthereumAddress) =>
await MockVariableDebtTokenFactory.connect(
address ||
(await getDb().get(`${eContractid.MockVariableDebtToken}.${BRE.network.name}`).value())
.address,
await getFirstSigner()
);
export const getMockStableDebtToken = async (address?: tEthereumAddress) =>
await MockStableDebtTokenFactory.connect(
address ||
(await getDb().get(`${eContractid.MockStableDebtToken}.${BRE.network.name}`).value()).address,
await getFirstSigner()
);
export const getMockUniswapRouter = async (address?: tEthereumAddress) =>
await MockUniswapV2Router02Factory.connect(
address ||
(await getDb().get(`${eContractid.MockUniswapV2Router02}.${BRE.network.name}`).value())
.address,
await getFirstSigner()
);
export const getUniswapLiquiditySwapAdapter = async (address?: tEthereumAddress) =>
await UniswapLiquiditySwapAdapterFactory.connect(
address ||
(await getDb().get(`${eContractid.UniswapLiquiditySwapAdapter}.${BRE.network.name}`).value())
.address,
await getFirstSigner()
);
export const getUniswapRepayAdapter = async (address?: tEthereumAddress) =>
await UniswapRepayAdapterFactory.connect(
address ||
(await getDb().get(`${eContractid.UniswapRepayAdapter}.${BRE.network.name}`).value()).address,
await getFirstSigner() |
<<<<<<<
import {CommonsConfig} from '../config/commons';
const APPROVAL_AMOUNT_LENDING_POOL =
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
=======
import {parseEther} from 'ethers/lib/utils';
>>>>>>>
import {CommonsConfig} from '../config/commons';
const APPROVAL_AMOUNT_LENDING_POOL =
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
import {parseEther} from 'ethers/lib/utils'; |
<<<<<<<
=======
if (match) {
const query: Record<string, string | string[]> = Object.create(null);
if (url.search.length > 0) {
url.search.slice(1).split('&').forEach(searchParam => {
let [, key, value = ''] = /([^=]*)(?:=(.*))?/.exec(decodeURIComponent(searchParam.replace(/\+/g, ' ')));
if (typeof query[key] === 'string') query[key] = [<string>query[key]];
if (typeof query[key] === 'object') (query[key] as string[]).push(value);
else query[key] = value;
});
}
>>>>>>> |
<<<<<<<
it('Swap liquidity', async () => {
const {pool, dai, weth, users, configurator} = testEnv;
const user = users[1];
// Pause the pool
await configurator.setPoolPause(true);
// Try to execute liquidation
await expect(
pool.connect(user.signer).swapLiquidity(user.address, dai.address, weth.address, '1', '0x')
).revertedWith(P_IS_PAUSED);
// Unpause the pool
await configurator.setPoolPause(false);
});
=======
>>>>>>>
<<<<<<<
it('Repay with collateral', async () => {
const {pool, weth, dai, usdc, users, mockSwapAdapter, oracle, configurator} = testEnv;
const user = users[6];
const liquidator = users[5];
// Pause the pool
await configurator.setPoolPause(true);
// Try to execute liquidation
await expect(
pool
.connect(liquidator.signer)
.repayWithCollateral(
weth.address,
usdc.address,
user.address,
'1',
mockSwapAdapter.address,
'0x'
)
).revertedWith(P_IS_PAUSED);
// Unpause the pool
await configurator.setPoolPause(false);
});
=======
>>>>>>>
<<<<<<<
.flashLoan(_mockFlashLoanReceiver.address, weth.address, flashAmount, 1, '0x10', '0')
).revertedWith(P_IS_PAUSED);
=======
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 1, caller.address, '0x10', '0')
).revertedWith(IS_PAUSED);
>>>>>>>
.flashLoan(
_mockFlashLoanReceiver.address,
[weth.address],
[flashAmount],
1,
caller.address,
'0x10',
'0'
)
).revertedWith(P_IS_PAUSED); |
<<<<<<<
deployMockUniswapRouter,
deployUniswapLiquiditySwapAdapter,
deployUniswapRepayAdapter,
=======
deployWETHGateway,
deployWETHMocked,
>>>>>>>
deployWETHGateway,
deployWETHMocked,
deployMockUniswapRouter,
deployUniswapLiquiditySwapAdapter,
deployUniswapRepayAdapter, |
<<<<<<<
UiPoolDataProvider = 'UiPoolDataProvider',
=======
StableAndVariableTokensHelper = 'StableAndVariableTokensHelper',
ATokensAndRatesHelper = 'ATokensAndRatesHelper',
>>>>>>>
StableAndVariableTokensHelper = 'StableAndVariableTokensHelper',
ATokensAndRatesHelper = 'ATokensAndRatesHelper',
UiPoolDataProvider = 'UiPoolDataProvider', |
<<<<<<<
import { usingTenderly } from './tenderly-utils';
=======
import { addGas, totalGas } from '../gas-tracker';
>>>>>>>
import { usingTenderly } from './tenderly-utils';
import { addGas, totalGas } from '../gas-tracker'; |
<<<<<<<
// camera.context.matrix_p;
helpMatrixB.copy(this.gameObject.transform.getWorldMatrix()).inverse();
Matrix.multiply(matrix, helpMatrixA, matrix);
Matrix.multiply(matrix, helpMatrixB, matrix);
// let viewMatrix = camera.calcViewMatrix(helpMatrixA);
// let projectionMatrix = camera.calcProjectMatrix(512 / 512, helpMatrixB);
// Matrix.multiply(matrix, projectionMatrix, matrix);
// Matrix.multiply(matrix, viewMatrix, matrix);
=======
helpMatrixB.inverse(this.gameObject.transform.getWorldMatrix());
matrix.multiply(helpMatrixA).multiply(helpMatrixB);
>>>>>>>
// camera.context.matrix_p;
helpMatrixB.copy(this.gameObject.transform.getWorldMatrix()).inverse();
matrix.multiply(helpMatrixA).multiply(helpMatrixB);
// let viewMatrix = camera.calcViewMatrix(helpMatrixA);
// let projectionMatrix = camera.calcProjectMatrix(512 / 512, helpMatrixB);
// Matrix.multiply(matrix, projectionMatrix, matrix);
// Matrix.multiply(matrix, viewMatrix, matrix); |
<<<<<<<
const mockUniswapRouter = await deployMockUniswapRouter();
await insertContractAddressInDb(eContractid.MockUniswapV2Router02, mockUniswapRouter.address);
const UniswapLiquiditySwapAdapter = await deployUniswapLiquiditySwapAdapter([
addressesProvider.address,
mockUniswapRouter.address,
]);
await insertContractAddressInDb(
eContractid.UniswapLiquiditySwapAdapter,
UniswapLiquiditySwapAdapter.address
);
const UniswapRepayAdapter = await deployUniswapRepayAdapter([
addressesProvider.address,
mockUniswapRouter.address,
]);
await insertContractAddressInDb(eContractid.UniswapRepayAdapter, UniswapRepayAdapter.address);
await deployWalletBalancerProvider(addressesProvider.address);
=======
await deployWalletBalancerProvider();
>>>>>>>
const mockUniswapRouter = await deployMockUniswapRouter();
await insertContractAddressInDb(eContractid.MockUniswapV2Router02, mockUniswapRouter.address);
const UniswapLiquiditySwapAdapter = await deployUniswapLiquiditySwapAdapter([
addressesProvider.address,
mockUniswapRouter.address,
]);
await insertContractAddressInDb(
eContractid.UniswapLiquiditySwapAdapter,
UniswapLiquiditySwapAdapter.address
);
const UniswapRepayAdapter = await deployUniswapRepayAdapter([
addressesProvider.address,
mockUniswapRouter.address,
]);
await insertContractAddressInDb(eContractid.UniswapRepayAdapter, UniswapRepayAdapter.address);
await deployWalletBalancerProvider(); |
<<<<<<<
[0],
=======
0,
_mockFlashLoanReceiver.address,
>>>>>>>
[0],
_mockFlashLoanReceiver.address,
<<<<<<<
[0],
=======
0,
_mockFlashLoanReceiver.address,
>>>>>>>
[0],
_mockFlashLoanReceiver.address,
<<<<<<<
[0],
=======
0,
caller.address,
>>>>>>>
[0],
caller.address,
<<<<<<<
[0],
=======
0,
caller.address,
>>>>>>>
[0],
caller.address,
<<<<<<<
[4],
=======
4,
caller.address,
>>>>>>>
[4],
caller.address,
<<<<<<<
[2],
=======
2,
caller.address,
>>>>>>>
[2],
caller.address,
<<<<<<<
[2],
=======
2,
caller.address,
>>>>>>>
[2],
caller.address,
<<<<<<<
pool.flashLoan(deployer.address, [weth.address], ['1000000000000000000'], [2], '0x10', '0')
=======
pool.flashLoan(deployer.address, [weth.address], ['1000000000000000000'], 2, caller.address, '0x10', '0')
>>>>>>>
pool.flashLoan(
deployer.address,
[weth.address],
['1000000000000000000'],
[2],
caller.address,
'0x10',
'0'
)
<<<<<<<
[0],
=======
0,
_mockFlashLoanReceiver.address,
>>>>>>>
[0],
_mockFlashLoanReceiver.address,
<<<<<<<
[2],
=======
2,
caller.address,
>>>>>>>
[2],
caller.address,
<<<<<<<
.flashLoan(_mockFlashLoanReceiver.address, [usdc.address], [flashloanAmount], [2], '0x10', '0');
=======
.flashLoan(_mockFlashLoanReceiver.address, [usdc.address], [flashloanAmount], 2, caller.address, '0x10', '0');
>>>>>>>
.flashLoan(
_mockFlashLoanReceiver.address,
[usdc.address],
[flashloanAmount],
[2],
caller.address,
'0x10',
'0'
);
<<<<<<<
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], [0], '0x10', '0')
=======
.flashLoan(
_mockFlashLoanReceiver.address,
[weth.address],
[flashAmount],
0,
caller.address,
'0x10',
'0'
)
>>>>>>>
.flashLoan(
_mockFlashLoanReceiver.address,
[weth.address],
[flashAmount],
[0],
caller.address,
'0x10',
'0'
)
<<<<<<<
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], [1], '0x10', '0');
=======
.flashLoan(
_mockFlashLoanReceiver.address,
[weth.address],
[flashAmount],
1,
caller.address,
'0x10',
'0'
);
>>>>>>>
.flashLoan(
_mockFlashLoanReceiver.address,
[weth.address],
[flashAmount],
[1],
caller.address,
'0x10',
'0'
); |
<<<<<<<
export const getGenesisAaveAdmin = async (config: ICommonConfiguration) => {
const currentNetwork = DRE.network.name;
const targetAddress = getParamPerNetwork(config.AaveAdmin, <eEthereumNetwork>currentNetwork);
=======
export const getGenesisPoolAdmin = async (config: ICommonConfiguration) => {
const currentNetwork = BRE.network.name;
const targetAddress = getParamPerNetwork(config.PoolAdmin, <eEthereumNetwork>currentNetwork);
>>>>>>>
export const getGenesisPoolAdmin = async (config: ICommonConfiguration) => {
const currentNetwork = DRE.network.name;
const targetAddress = getParamPerNetwork(config.PoolAdmin, <eEthereumNetwork>currentNetwork); |
<<<<<<<
create_main_manifests({ routes, dev_port: this.dev_port });
=======
create_main_manifests({ bundler: this.bundler, routes, dev_port });
>>>>>>>
create_main_manifests({ bundler: this.bundler, routes, dev_port: this.dev_port });
<<<<<<<
create_main_manifests({ routes, dev_port: this.dev_port });
=======
create_main_manifests({ bundler: this.bundler, routes, dev_port });
>>>>>>>
create_main_manifests({ bundler: this.bundler, routes, dev_port: this.dev_port });
<<<<<<<
create_main_manifests({ routes, dev_port: this.dev_port });
=======
create_main_manifests({ bundler: this.bundler, routes, dev_port });
>>>>>>>
create_main_manifests({ bundler: this.bundler, routes, dev_port: this.dev_port }); |
<<<<<<<
getPairsTokenAggregator,
initReserves,
=======
deployStableDebtToken,
deployVariableDebtToken,
deployGenericAToken,
deployMockSwapAdapter,
>>>>>>>
getPairsTokenAggregator,
initReserves,
deployMockSwapAdapter, |
<<<<<<<
expect(callerDebt.toString()).to.be.equal('800720000000000000', 'Invalid user debt');
});
it('tries to take a very small flashloan, which would result in 0 fees (revert expected)', async () => {
const {pool, weth, users} = testEnv;
const caller = users[1];
await expect(
pool.connect(caller.signer).flashLoan(
_mockFlashLoanReceiver.address,
weth.address,
'1', //1 wei loan
2,
caller.address,
'0x10',
'0'
)
).to.be.revertedWith(REQUESTED_AMOUNT_TOO_SMALL);
=======
expect(callerDebt.toString()).to.be.equal('800000000000000000', 'Invalid user debt');
>>>>>>>
expect(callerDebt.toString()).to.be.equal('800000000000000000', 'Invalid user debt');
<<<<<<<
pool
.connect(caller.signer)
.flashLoan(
deployer.address,
weth.address,
'1000000000000000000',
2,
caller.address,
'0x10',
'0'
)
=======
pool.flashLoan(deployer.address, [weth.address], ['1000000000000000000'], 2, '0x10', '0')
>>>>>>>
pool.flashLoan(deployer.address, [weth.address], ['1000000000000000000'], 2, caller.address, '0x10', '0')
<<<<<<<
.flashLoan(
_mockFlashLoanReceiver.address,
usdc.address,
flashloanAmount,
0,
_mockFlashLoanReceiver.address,
'0x10',
'0'
)
=======
.flashLoan(
_mockFlashLoanReceiver.address,
[usdc.address],
[flashloanAmount],
2,
'0x10',
'0'
)
>>>>>>>
.flashLoan(
_mockFlashLoanReceiver.address,
[usdc.address],
[flashloanAmount],
2,
_mockFlashLoanReceiver.address,
'0x10',
'0'
)
<<<<<<<
.flashLoan(
_mockFlashLoanReceiver.address,
usdc.address,
flashloanAmount,
2,
caller.signer,
'0x10',
'0'
);
=======
.flashLoan(_mockFlashLoanReceiver.address, [usdc.address], [flashloanAmount], 2, '0x10', '0');
>>>>>>>
.flashLoan(_mockFlashLoanReceiver.address, [usdc.address], [flashloanAmount], 2, caller.address, '0x10', '0');
<<<<<<<
.flashLoan(
_mockFlashLoanReceiver.address,
weth.address,
flashAmount,
0,
_mockFlashLoanReceiver.address,
'0x10',
'0'
)
=======
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 0, '0x10', '0')
>>>>>>>
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 0, _mockFlashLoanReceiver.address, '0x10', '0')
<<<<<<<
.flashLoan(
_mockFlashLoanReceiver.address,
weth.address,
flashAmount,
1,
caller.signer,
'0x10',
'0'
);
=======
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 1, '0x10', '0');
>>>>>>>
.flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 1, caller.address, '0x10', '0'); |
<<<<<<<
import {MockContract} from 'ethereum-waffle';
import {getReservesConfigByPool} from './configuration';
import {verifyContract} from './etherscan-verification';
import {cpuUsage} from 'process';
const {
ProtocolGlobalParams: {UsdAddress},
} = CommonsConfig;
export type MockTokenMap = {[symbol: string]: MintableERC20};
=======
import {MockSwapAdapter} from '../types/MockSwapAdapter';
>>>>>>>
import {MockContract} from 'ethereum-waffle';
import {getReservesConfigByPool} from './configuration';
import {verifyContract} from './etherscan-verification';
const {
ProtocolGlobalParams: {UsdAddress},
} = CommonsConfig;
export type MockTokenMap = {[symbol: string]: MintableERC20};
import {MockSwapAdapter} from '../types/MockSwapAdapter';
<<<<<<<
export const deployWalletBalancerProvider = async (
addressesProvider: tEthereumAddress,
verify?: boolean
) => {
const args = [addressesProvider];
const instance = await deployContract<WalletBalanceProvider>(
eContractid.WalletBalanceProvider,
args
);
if (verify) {
await verifyContract(eContractid.WalletBalanceProvider, instance.address, args);
}
return instance;
};
=======
export const deployMockSwapAdapter = async (addressesProvider: tEthereumAddress) =>
await deployContract<MockSwapAdapter>(eContractid.MockSwapAdapter, [addressesProvider]);
export const deployWalletBalancerProvider = async (addressesProvider: tEthereumAddress) =>
await deployContract<WalletBalanceProvider>(eContractid.WalletBalanceProvider, [
addressesProvider,
]);
>>>>>>>
export const deployWalletBalancerProvider = async (
addressesProvider: tEthereumAddress,
verify?: boolean
) => {
const args = [addressesProvider];
const instance = await deployContract<WalletBalanceProvider>(
eContractid.WalletBalanceProvider,
args
);
if (verify) {
await verifyContract(eContractid.WalletBalanceProvider, instance.address, args);
}
return instance;
};
export const deployMockSwapAdapter = async (addressesProvider: tEthereumAddress) =>
await deployContract<MockSwapAdapter>(eContractid.MockSwapAdapter, [addressesProvider]); |
<<<<<<<
import {createBasicAuthClient} from "../__mocks__/base";
import { documentContent } from "../__mocks__/platforms/documentContent";
=======
import {createBasicAuthClient} from "../__mocks__/base";
>>>>>>>
import {createBasicAuthClient} from "../__mocks__/base";
import { documentContent } from "../__mocks__/platforms/documentContent";
<<<<<<<
=======
beforeEach((): void => {
if (!nock.isActive()) {
nock.activate();
}
client = createBasicAuthClient();
client.config.password = process.env.ADYEN_MARKETPLACE_PASSWORD;
client.config.username = process.env.ADYEN_MARKETPLACE_USER;
platforms = new Platforms(client);
>>>>>>>
<<<<<<<
const result = await service[args[0] as string](args[1] as any);
=======
const result = await service[args[0] as string](args[1] as never);
>>>>>>>
const result = await service[args[0] as string](args[1] as never);
<<<<<<<
it("should create account holder", async function() {
nock.restore();
try {
expect(accountHolder.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should get account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.getAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
});
expect(result.accountHolderDetails.email).toEqual("[email protected]");
} catch (e) {
assertError(e);
}
});
it("should update account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.updateAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
accountHolderDetails: {
...accountHolderDetails,
address: {
country: "BE"
}
}
});
expect(result.accountHolderDetails!.address?.country).toEqual("BE");
} catch (e) {
assertError(e);
}
});
it("should check account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.checkAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
accountStateType: "Processing",
tier: 2
});
expect(result.resultCode).toEqual("Success");
} catch (e) {
assertError(e);
}
});
it("should create an account", async function() {
nock.restore();
try {
expect(account.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should upload verification document", async function() {
nock.restore();
try {
const result = await platforms.Account.uploadDocument({
documentContent: documentContent,
documentDetail: {
accountHolderCode: account.accountHolderCode,
documentType: "ID_CARD_FRONT",
description: "test document 000",
filename: "IDCardFront.png"
}
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should get uploaded verification documents", async function() {
nock.restore();
try {
await platforms.Account.uploadDocument({
documentContent: documentContent,
documentDetail: {
accountHolderCode: account.accountHolderCode,
documentType: "ID_CARD_FRONT",
description: "test document 000",
filename: "IDCardFront.png"
}
});
const result = await platforms.Account.getUploadedDocuments({
accountHolderCode: account.accountHolderCode,
});
expect(result.documentDetails![0].filename).toEqual("IDCardFront.png");
} catch (e) {
assertError(e);
}
});
it("should close account", async function() {
nock.restore();
try {
const result = await platforms.Account.closeAccount({
accountCode: accountToClose.accountCode
});
expect(result.status).toEqual("Closed");
} catch (e) {
assertError(e);
}
});
it("should suspend account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.suspendAccountHolder({
accountHolderCode: accountHolderToSuspend.accountHolderCode,
});
expect(result.accountHolderStatus.status).toEqual("Suspended");
} catch (e) {
assertError(e);
}
});
it("should unsuspend account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.unSuspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode });
expect(result.accountHolderStatus.status).toEqual("Active");
} catch (e) {
assertError(e);
}
});
it("should update account holder state", async function() {
nock.restore();
try {
const result = await platforms.Account.updateAccountHolderState({
accountHolderCode: accountHolder.accountHolderCode,
disable: false,
stateType: "Payout"
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should close account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.closeAccountHolder({
accountHolderCode: accountHolderToClose.accountHolderCode
});
expect(result.accountHolderStatus.status).toEqual("Closed");
} catch (e) {
assertError(e);
}
});
=======
it("should create account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.accountHolders.createAccountHolder({
accountHolderCode: Date.now().toString(2),
accountHolderDetails: {
email: "[email protected]",
fullPhoneNumber: "312030291928",
webAddress: "http://example.com",
individualDetails: {
name: {
firstName: "John",
gender: "MALE",
lastName: "Smith"
}
},
address: {
country: "NL"
}
},
legalEntity: "Individual",
});
expect(result.pspReference).toBeDefined();
} catch (e) {
fail(e.responseBody);
}
});
>>>>>>>
it("should create account holder", async function() {
nock.restore();
try {
expect(accountHolder.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should get account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.getAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
});
expect(result.accountHolderDetails.email).toEqual("[email protected]");
} catch (e) {
assertError(e);
}
});
it("should update account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.updateAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
accountHolderDetails: {
...accountHolderDetails,
address: {
country: "BE"
}
}
});
expect(result.accountHolderDetails!.address?.country).toEqual("BE");
} catch (e) {
assertError(e);
}
});
it("should check account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.checkAccountHolder({
accountHolderCode: accountHolder.accountHolderCode,
accountStateType: "Processing",
tier: 2
});
expect(result.resultCode).toEqual("Success");
} catch (e) {
assertError(e);
}
});
it("should create an account", async function() {
nock.restore();
try {
expect(account.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should upload verification document", async function() {
nock.restore();
try {
const result = await platforms.Account.uploadDocument({
documentContent: documentContent,
documentDetail: {
accountHolderCode: account.accountHolderCode,
documentType: "ID_CARD_FRONT",
description: "test document 000",
filename: "IDCardFront.png"
}
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should get uploaded verification documents", async function() {
nock.restore();
try {
await platforms.Account.uploadDocument({
documentContent: documentContent,
documentDetail: {
accountHolderCode: account.accountHolderCode,
documentType: "ID_CARD_FRONT",
description: "test document 000",
filename: "IDCardFront.png"
}
});
const result = await platforms.Account.getUploadedDocuments({
accountHolderCode: account.accountHolderCode,
});
expect(result.documentDetails![0].filename).toEqual("IDCardFront.png");
} catch (e) {
assertError(e);
}
});
it("should close account", async function() {
nock.restore();
try {
const result = await platforms.Account.closeAccount({
accountCode: accountToClose.accountCode
});
expect(result.status).toEqual("Closed");
} catch (e) {
assertError(e);
}
});
it("should suspend account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.suspendAccountHolder({
accountHolderCode: accountHolderToSuspend.accountHolderCode,
});
expect(result.accountHolderStatus.status).toEqual("Suspended");
} catch (e) {
assertError(e);
}
});
it("should unsuspend account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.unSuspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode });
expect(result.accountHolderStatus.status).toEqual("Active");
} catch (e) {
assertError(e);
}
});
it("should update account holder state", async function() {
nock.restore();
try {
const result = await platforms.Account.updateAccountHolderState({
accountHolderCode: accountHolder.accountHolderCode,
disable: false,
stateType: "Payout"
});
expect(result.pspReference).toBeDefined();
} catch (e) {
assertError(e);
}
});
it("should close account holder", async function() {
nock.restore();
try {
const result = await platforms.Account.closeAccountHolder({
accountHolderCode: accountHolderToClose.accountHolderCode
});
expect(result.accountHolderStatus.status).toEqual("Closed");
} catch (e) {
assertError(e);
}
}); |
<<<<<<<
=======
entryComponents: [DeleteAccountDialogComponent],
providers: [Register, ActivateService, PasswordService, PasswordResetInitService, PasswordResetFinishService],
>>>>>>>
entryComponents: [DeleteAccountDialogComponent], |
<<<<<<<
this.sharedData.emit(this.data);
this.gitService.getCompanies(gitProvider).subscribe(
=======
this.data.gitCompanyListRefresh = true;
this.gitConfigurationService.gitProviderService.getCompanies(gitProvider).subscribe(
>>>>>>>
this.data.gitCompanyListRefresh = true;
this.gitConfigurationService.gitProviderService.getCompanies(gitProvider).subscribe(
<<<<<<<
this.addToAvailableProviderList(gitProvider);
if (this.simpleMode) {
=======
if (this.router.url === '/generate-application') {
>>>>>>>
this.addToAvailableProviderList(gitProvider);
if (this.simpleMode) {
<<<<<<<
this.refreshGitProjectList();
this.sharedData.emit(this.data);
=======
this.updateGitProjectList(this.data.selectedGitCompany);
>>>>>>>
this.updateGitProjectList(this.data.selectedGitCompany);
this.sharedData.emit(this.data);
<<<<<<<
this.sharedData.emit(this.data);
this.gitService.refreshGitProvider(this.data.selectedGitProvider).subscribe(
=======
this.gitConfigurationService.gitProviderService.refreshGitProvider(this.data.selectedGitProvider).subscribe(
>>>>>>>
this.sharedData.emit(this.data);
this.gitConfigurationService.gitProviderService.refreshGitProvider(this.data.selectedGitProvider).subscribe(
<<<<<<<
this.gitService.getProjects(this.data.selectedGitProvider, companyName).subscribe(projects => {
this.data.gitProjects = projects.sort();
=======
this.gitConfigurationService.gitProviderService.getProjects(this.data.selectedGitProvider, companyName).subscribe(projects => {
this.data.gitProjects = projects;
>>>>>>>
this.gitConfigurationService.gitProviderService.getProjects(this.data.selectedGitProvider, companyName).subscribe(projects => {
this.data.gitProjects = projects.sort();
<<<<<<<
isRefreshing() {
return this.data.gitCompanyListRefresh || this.data.gitProjectListRefresh;
}
private setGitProviderConfigurationStatus(gitProvider: string, status: boolean) {
if (gitProvider === 'github') {
this.data.isGithubConfigured = status;
this.data = {
...this.data,
isGithubConfigured: this.data.isGithubConfigured
};
} else if (gitProvider === 'gitlab') {
this.data.isGitlabConfigured = status;
this.data = {
...this.data,
isGitlabConfigured: this.data.isGitlabConfigured
};
}
this.sharedData.emit(this.data);
}
private addToAvailableProviderList(gitProvider: string) {
if (!this.data.availableGitProviders.includes(gitProvider)) {
this.data.availableGitProviders.push(gitProvider);
}
=======
private newGitProviderModel() {
this.data = new GitProviderModel([], null, null, null, [], [], false, false);
>>>>>>>
isRefreshing() {
return this.data.gitCompanyListRefresh || this.data.gitProjectListRefresh;
}
private newGitProviderModel() {
this.data = new GitProviderModel([], null, null, null, [], [], false, false); |
<<<<<<<
it('/POST deployments/default should do a upsert if a module already exists and has new components ', async() => {
const createDeploymentRequest = {
deploymentId: '5ba3691b-d647-4a36-9f6d-c089f114e476',
applicationName: 'c26fbf77-5da1-4420-8dfa-4dea235a9b1e',
modules: [
{
moduleId: '23776617-7840-4819-b356-30e165b7ebb9',
helmRepository: 'helm-repository.com',
components: [
{
componentId: '68335d19-ce03-4cf8-84b4-5574257c982e',
componentName: 'component-name',
buildImageUrl: 'image-url',
buildImageTag: 'image-tag'
},
{
componentId: 'component-id-upsert',
componentName: 'component-upsert',
buildImageUrl: 'image-url2',
buildImageTag: 'image-tag2'
}
]
}
],
authorId: 'author-id',
description: 'Deployment from Charles C.D.',
callbackUrl: 'http://localhost:8883/moove',
cdConfigurationId: '4046f193-9479-48b5-ac29-01f419b64cb5',
circle: null
}
const moduleEntity = await modulesRepository.findOneOrFail({
where :{ id: '23776617-7840-4819-b356-30e165b7ebb9' },
relations: ['components']
})
await request(app.getHttpServer()).post('/deployments/default').send(createDeploymentRequest).expect(201)
const moduleEntityUpdated = await modulesRepository.findOneOrFail({
where :{ id: '23776617-7840-4819-b356-30e165b7ebb9' },
relations: ['components'],
})
const componentsModuleEntities = await componentsRepository.find({
where :{ module: '23776617-7840-4819-b356-30e165b7ebb9' },
order: { createdAt: 'ASC' },
})
const deployment = await deploymentsRepository.findOne(
{ id: createDeploymentRequest.deploymentId },
{ relations: ['modules', 'modules.components'],
},
)
if (!deployment) {
fail('Deployment entity was not saved')
}
expect(moduleEntity.components.length).not.toEqual(moduleEntityUpdated.components.length)
expect(moduleEntity.components.length).toBe(1)
expect(moduleEntityUpdated.components.length).toBe(2)
expect(componentsModuleEntities[0].id).toEqual(createDeploymentRequest.modules[0].components[0].componentId)
expect(componentsModuleEntities[1].id).toEqual(createDeploymentRequest.modules[0].components[1].componentId)
expect(deployment.modules[0].components[0].componentId).toEqual(createDeploymentRequest.modules[0].components[0].componentId)
expect(deployment.modules[0].components[1].componentId).toEqual(createDeploymentRequest.modules[0].components[1].componentId)
})
it('/POST deployments/default should fail if already exists deployment ', done => {
=======
it('/POST /deployments in default circle should fail if already exists deployment ', done => {
>>>>>>>
it('/POST deployments/default should do a upsert if a module already exists and has new components ', async() => {
const createDeploymentRequest = {
deploymentId: '5ba3691b-d647-4a36-9f6d-c089f114e476',
applicationName: 'c26fbf77-5da1-4420-8dfa-4dea235a9b1e',
modules: [
{
moduleId: '23776617-7840-4819-b356-30e165b7ebb9',
helmRepository: 'helm-repository.com',
components: [
{
componentId: '68335d19-ce03-4cf8-84b4-5574257c982e',
componentName: 'component-name',
buildImageUrl: 'image-url',
buildImageTag: 'image-tag'
},
{
componentId: 'component-id-upsert',
componentName: 'component-upsert',
buildImageUrl: 'image-url2',
buildImageTag: 'image-tag2'
}
]
}
],
authorId: 'author-id',
description: 'Deployment from Charles C.D.',
callbackUrl: 'http://localhost:8883/moove',
cdConfigurationId: '4046f193-9479-48b5-ac29-01f419b64cb5',
circle: null
}
const moduleEntity = await modulesRepository.findOneOrFail({
where :{ id: '23776617-7840-4819-b356-30e165b7ebb9' },
relations: ['components']
})
await request(app.getHttpServer()).post('/deployments/default').send(createDeploymentRequest).expect(201)
const moduleEntityUpdated = await modulesRepository.findOneOrFail({
where :{ id: '23776617-7840-4819-b356-30e165b7ebb9' },
relations: ['components'],
})
const componentsModuleEntities = await componentsRepository.find({
where :{ module: '23776617-7840-4819-b356-30e165b7ebb9' },
order: { createdAt: 'ASC' },
})
const deployment = await deploymentsRepository.findOne(
{ id: createDeploymentRequest.deploymentId },
{ relations: ['modules', 'modules.components'],
},
)
if (!deployment) {
fail('Deployment entity was not saved')
}
expect(moduleEntity.components.length).not.toEqual(moduleEntityUpdated.components.length)
expect(moduleEntity.components.length).toBe(1)
expect(moduleEntityUpdated.components.length).toBe(2)
expect(componentsModuleEntities[0].id).toEqual(createDeploymentRequest.modules[0].components[0].componentId)
expect(componentsModuleEntities[1].id).toEqual(createDeploymentRequest.modules[0].components[1].componentId)
expect(deployment.modules[0].components[0].componentId).toEqual(createDeploymentRequest.modules[0].components[0].componentId)
expect(deployment.modules[0].components[1].componentId).toEqual(createDeploymentRequest.modules[0].components[1].componentId)
})
it('/POST /deployments in default circle should fail if already exists deployment ', done => { |
<<<<<<<
import { OctopipeApiService } from '../../../app/core/integrations/cd/octopipe/octopipe-api.service'
import { CallbackTypeEnum } from '../../../app/api/notifications/enums/callback-type.enum'
import { ModuleEntity } from '../../../app/api/modules/entity'
=======
import { OctopipeApiService } from '../../../app/v1/core/integrations/cd/octopipe/octopipe-api.service'
import { ModuleEntity } from '../../../app/v1/api/modules/entity'
>>>>>>>
import { OctopipeApiService } from '../../../app/v1/core/integrations/cd/octopipe/octopipe-api.service'
import { ModuleEntity } from '../../../app/v1/api/modules/entity'
import { CallbackTypeEnum } from '../../../app/api/notifications/enums/callback-type.enum' |
<<<<<<<
import { CallbackTypeEnum } from '../../../app/api/notifications/enums/callback-type.enum'
=======
import { ModuleEntity } from '../../../app/api/modules/entity'
>>>>>>>
import { CallbackTypeEnum } from '../../../app/api/notifications/enums/callback-type.enum'
import { ModuleEntity } from '../../../app/api/modules/entity' |
<<<<<<<
requisiteStageRefIds: [`${stageId - 1}`],
=======
requisiteStageRefIds: evalStageId ? [`${evalStageId}`] : [],
>>>>>>>
requisiteStageRefIds: evalStageId ? [`${evalStageId}`] : [`${stageId - 1}`], |
<<<<<<<
import { saveProfile, getProfile } from 'core/utils/profile';
import { isIDMEnabled } from 'core/utils/auth';
=======
import { isIDMAuthFlow } from 'core/utils/auth';
import { loadedWorkspacesAction } from 'modules/Workspaces/state/actions';
import { WorkspacePagination } from 'modules/Workspaces/interfaces/WorkspacePagination';
import { getProfile, saveProfile } from 'core/utils/profile';
>>>>>>>
import { saveProfile, getProfile } from 'core/utils/profile';
import { isIDMEnabled } from 'core/utils/auth';
import { loadedWorkspacesAction } from 'modules/Workspaces/state/actions';
import { WorkspacePagination } from 'modules/Workspaces/interfaces/WorkspacePagination'; |
<<<<<<<
import { User, Profile, NewUser } from './interfaces/User';
import { logout } from 'core/utils/auth';
=======
import { User, Profile, NewUser, NewPassword } from './interfaces/User';
>>>>>>>
import { User, Profile, NewUser, NewPassword } from './interfaces/User';
import { logout } from 'core/utils/auth'; |
<<<<<<<
import { CallbackTypeEnum } from '../../../app/v1/api/notifications/enums/callback-type.enum'
=======
import * as uuid from 'uuid'
import { CdTypeEnum } from '../../../app/v1/api/configurations/enums'
>>>>>>>
import { CallbackTypeEnum } from '../../../app/v1/api/notifications/enums/callback-type.enum'
import * as uuid from 'uuid'
import { CdTypeEnum } from '../../../app/v1/api/configurations/enums'
<<<<<<<
const moduleUndeployment: ModuleUndeploymentEntity[] = await moduleUndeploymentsRepository.find({ where : { undeploymentId: undeployment.id }, relations: ['componentUndeployments'] })
=======
const moduleUndeployment: ModuleUndeploymentEntity[] = await moduleUndeploymentsRepository.find(
{ where :
{ undeploymentId: undeployment.id },
relations: ['componentUndeployments'],
order : { status: 'ASC' }
})
>>>>>>>
const moduleUndeployment: ModuleUndeploymentEntity[] = await moduleUndeploymentsRepository.find(
{ where :
{ undeploymentId: undeployment.id },
relations: ['componentUndeployments'],
order : { status: 'ASC' }
}) |
<<<<<<<
it(`/POST /deployments in default circle should create deployment, module deployment and component deployment entities`, async () => {
=======
it('/POST deployments/default should create deployment, module deployment and component deployment entities', async() => {
>>>>>>>
it('/POST /deployments in default circle should create deployment, module deployment and component deployment entities', async() => {
<<<<<<<
it(`/POST /deployments in default circle should fail if already exists deployment `, done => {
=======
it('/POST deployments/default should fail if already exists deployment ', done => {
>>>>>>>
it('/POST /deployments in default circle should fail if already exists deployment ', done => {
<<<<<<<
it(`/POST /deployments in default circle should enqueue RUNNING component deployments correctly`, async () => {
=======
it('/POST deployments/default should enqueue RUNNING component deployments correctly', async() => {
>>>>>>>
it('/POST /deployments in default circle should enqueue RUNNING component deployments correctly', async() => {
<<<<<<<
it(`/POST /deployments in default circle should enqueue QUEUED and RUNNING component deployments correctly`, async () => {
=======
it('/POST deployments/default should enqueue QUEUED and RUNNING component deployments correctly', async() => {
>>>>>>>
it('/POST /deployments in default circle should enqueue QUEUED and RUNNING component deployments correctly', async() => {
<<<<<<<
it(`/POST /deployments in default circle should correctly update component pipeline options`, async () => {
=======
it('/POST deployments/default should correctly update component pipeline options', async() => {
>>>>>>>
it('/POST /deployments in default circle should correctly update component pipeline options', async() => {
<<<<<<<
it(`/POST /deployments in default circle should call octopipe for each RUNNING component deployment`, async () => {
=======
it('/POST deployments/default should call octopipe for each RUNNING component deployment', async() => {
>>>>>>>
it('/POST /deployments in default circle should call octopipe for each RUNNING component deployment', async() => {
<<<<<<<
it(`/POST deployments in default should handle deployment failure `, async () => {
=======
it('/POST deployments/default should handle deployment failure ', async() => {
>>>>>>>
it('/POST deployments in default should handle deployment failure ', async() => {
<<<<<<<
it(`/POST deployments in default should handle deployment failure `, async () => {
=======
it('/POST deployments/default should handle deployment failure ', async() => {
>>>>>>>
it('/POST deployments in default should handle deployment failure ', async() => { |
<<<<<<<
import { User, Profile, NewUser, NewPassword } from './interfaces/User';
import { isIDMEnabled } from 'core/utils/auth';
=======
import { User, NewUser, NewPassword } from './interfaces/User';
import { isIDMAuthFlow } from 'core/utils/auth';
>>>>>>>
import { User, NewUser, NewPassword } from './interfaces/User';
import { isIDMEnabled } from 'core/utils/auth'; |
<<<<<<<
export const radios: RadioButton[] = [
{ icon: 'spinnaker', name: 'Octopipe', value: 'OCTOPIPE' },
=======
export const radios: Radio[] = [
{ icon: 'charlescd', name: 'CharlesCD', value: 'OCTOPIPE' },
>>>>>>>
export const radios: RadioButton[] = [
{ icon: 'charlescd', name: 'CharlesCD', value: 'OCTOPIPE' }, |
<<<<<<<
@UsePipes(DeploymentUniquenessPipe)
@Post()
public async createDeployment(
@Body() createDeploymentRequestDto: CreateDeploymentRequestDto,
@Headers('x-circle-id') incomingCircleId: string
=======
@UsePipes(DeploymentUniquenessPipe, ComponentDeploymentUniquenessPipe)
@Post('/circle')
public async createCircleDeployment(
@Body() createCircleDeploymentRequestDto: CreateCircleDeploymentRequestDto,
@Headers('x-circle-id') circleId: string
>>>>>>>
@UsePipes(DeploymentUniquenessPipe, ComponentDeploymentUniquenessPipe)
@Post()
public async createDeployment(
@Body() createDeploymentRequestDto: CreateDeploymentRequestDto,
@Headers('x-circle-id') incomingCircleId: string
<<<<<<<
if (createDeploymentRequestDto.circle) {
return await this.createCircleDeploymentRequestUsecase.execute(createDeploymentRequestDto, incomingCircleId)
}
return await this.createDefaultDeploymentRequestUsecase.execute(createDeploymentRequestDto, incomingCircleId)
=======
return await this.createCircleDeploymentRequestUsecase.execute(createCircleDeploymentRequestDto, circleId)
}
@UsePipes(DeploymentUniquenessPipe, ComponentDeploymentUniquenessPipe)
@Post('/default')
public async createDefaultDeployment(
@Body() createDefaultDeploymentRequestDto: CreateDefaultDeploymentRequestDto,
@Headers('x-circle-id') circleId: string
): Promise<ReadDeploymentDto> {
return await this.createDefaultDeploymentRequestUsecase.execute(createDefaultDeploymentRequestDto, circleId)
>>>>>>>
if (createDeploymentRequestDto.circle) {
return await this.createCircleDeploymentRequestUsecase.execute(createDeploymentRequestDto, incomingCircleId)
}
return await this.createDefaultDeploymentRequestUsecase.execute(createDeploymentRequestDto, incomingCircleId) |
<<<<<<<
import {
useFetch,
FetchProps,
useFetchData,
FetchStatuses
} from 'core/providers/base/hooks';
=======
import {
useFetch,
FetchProps,
FetchStatuses,
useFetchData
} from 'core/providers/base/hooks';
>>>>>>>
import {
useFetch,
FetchProps,
FetchStatuses,
useFetchData
} from 'core/providers/base/hooks';
<<<<<<<
status: FetchStatuses;
addModules: Function;
=======
status: FetchStatuses;
persistModules: (cardId: string, payload: CardPayload) => void;
>>>>>>>
status: FetchStatuses;
persistModules: Function;
<<<<<<<
const [status, setStatus] = useState<FetchStatuses>('idle');
const updateCard = useFetchData(updateById);
const addModules = useCallback(
async (cardId: string, payload: CardPayload) => {
try {
setStatus('pending');
await updateCard(cardId, payload);
setStatus('resolved');
} catch (e) {
setStatus('rejected');
const error = await e.json();
dispatch(
toogleNotification({
text: `${error.message}`,
status: 'error'
})
);
return Promise.reject(error);
}
=======
const [, , updateCard] = useFetch(updateById);
const [status, setStatus] = useState<FetchStatuses>('idle');
const persistModules = useCallback(
async (cardId: string, payload: CardPayload) => {
try {
setStatus('pending');
await updateCard(cardId, payload);
setStatus('resolved');
} catch (e) {
setStatus('rejected');
const error = await e.json();
dispatch(
toogleNotification({
text: `[${error.status}] This module could not be tied.`,
status: 'error'
})
);
}
>>>>>>>
const [status, setStatus] = useState<FetchStatuses>('idle');
const updateCard = useFetchData(updateById);
const persistModules = useCallback(
async (cardId: string, payload: CardPayload) => {
try {
setStatus('pending');
await updateCard(cardId, payload);
setStatus('resolved');
} catch (e) {
setStatus('rejected');
const error = await e.json();
dispatch(
toogleNotification({
text: `[${error.status}] This module could not be tied.`,
status: 'error'
})
);
return Promise.reject(error);
}
<<<<<<<
status,
addModules
=======
status,
persistModules
>>>>>>>
status,
persistModules |
<<<<<<<
import istioPipeline from './fixtures/expected-istio-pipeline'
import { CallbackTypeEnum } from '../../../../app/v1/api/notifications/enums/callback-type.enum'
=======
import istioPipeline, { istioPipelineHostValueAndGateway } from './fixtures/expected-istio-pipeline'
>>>>>>>
import { CallbackTypeEnum } from '../../../../app/v1/api/notifications/enums/callback-type.enum'
import istioPipeline, { istioPipelineHostValueAndGateway } from './fixtures/expected-istio-pipeline'
<<<<<<<
url: 'http://spinnaker.url.com',
callbackType: CallbackTypeEnum.DEPLOYMENT
=======
url: 'http://spinnaker.url.com',
>>>>>>>
url: 'http://spinnaker.url.com',
callbackType: CallbackTypeEnum.DEPLOYMENT |
<<<<<<<
const WarningPercentageContainer = styled.div`
display: flex;
flex-direction: row;
margin-top: 15px;
margin-bottom: 15px;
> span {
margin-left: 10px;
}
`;
=======
const FieldErrorWrapper = styled.div`
display: flex;
margin-top: 2px;
span {
margin-left: 5px;
margin-top: 2px;
}
`;
>>>>>>>
const WarningPercentageContainer = styled.div`
display: flex;
flex-direction: row;
margin-top: 15px;
margin-bottom: 15px;
> span {
margin-left: 10px;
}
`;
const FieldErrorWrapper = styled.div`
display: flex;
margin-top: 2px;
span {
margin-left: 5px;
margin-top: 2px;
}
`;
<<<<<<<
MetricsGroupsThresholdsContent,
WarningPercentageContainer
=======
MetricsGroupsThresholdsContent,
FieldErrorWrapper
>>>>>>>
MetricsGroupsThresholdsContent,
WarningPercentageContainer,
FieldErrorWrapper |
<<<<<<<
=======
next() {
this.onClickNext();
}
previous() {
this.onClickPrevious();
}
>>>>>>> |
<<<<<<<
import { MooveService } from '../../../app/core/integrations/moove'
import { CallbackTypeEnum } from '../../../app/api/notifications/enums/callback-type.enum'
import { ModuleDeploymentsRepository } from '../../../app/api/deployments/repository/module-deployments.repository'
=======
import { MooveService } from '../../../app/v1/core/integrations/moove'
import { ModuleDeploymentsRepository } from '../../../app/v1/api/deployments/repository/module-deployments.repository'
>>>>>>>
import { MooveService } from '../../../app/v1/core/integrations/moove'
import { ModuleDeploymentsRepository } from '../../../app/v1/api/deployments/repository/module-deployments.repository'
import { CallbackTypeEnum } from '../../../app/api/notifications/enums/callback-type.enum' |
<<<<<<<
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "OptimizationSplitChunksGetCacheGroups".
*/
export type OptimizationSplitChunksGetCacheGroups = (
module: import("../lib/Module")
) =>
| OptimizationSplitChunksCacheGroup
| OptimizationSplitChunksCacheGroup[]
| void;
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "OptimizationSplitChunksSizes".
*/
export type OptimizationSplitChunksSizes =
| number
| {
/**
* Size of the part of the chunk with the type of the key
*/
[k: string]: number;
};
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "FilterTypes".
*/
export type FilterTypes = FilterItemTypes | FilterItemTypes[];
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "FilterItemTypes".
*/
export type FilterItemTypes = RegExp | string | Function;
=======
>>>>>>>
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "OptimizationSplitChunksGetCacheGroups".
*/
export type OptimizationSplitChunksGetCacheGroups = (
module: import("../lib/Module")
) =>
| OptimizationSplitChunksCacheGroup
| OptimizationSplitChunksCacheGroup[]
| void;
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "OptimizationSplitChunksSizes".
*/
export type OptimizationSplitChunksSizes =
| number
| {
/**
* Size of the part of the chunk with the type of the key
*/
[k: string]: number;
}; |
<<<<<<<
cacheControl?: CacheControlExtensionOptions | boolean;
=======
plugins?: [];
>>>>>>>
cacheControl?: CacheControlExtensionOptions | boolean;
plugins?: []; |
<<<<<<<
// If request context's `metrics` already exists, preserve it, but _ensure_ it
// exists there and shorthand it for use throughout this function. As of this
// comment, the sole known case where `metrics` already exists is when the
// `captureTraces` property is present and set to the result of the boolean
// `reporting` option on the legacy (V1) server options, here:
// https://git.io/Jfmsb. I suspect this disappears when this is the direct
// entry into request processing, rather than through, e.g. `runHttpQuery`.
const metrics = requestContext.metrics =
requestContext.metrics || Object.create(null);
let cacheControlExtension: CacheControlExtension | undefined;
=======
>>>>>>>
// If request context's `metrics` already exists, preserve it, but _ensure_ it
// exists there and shorthand it for use throughout this function. As of this
// comment, the sole known case where `metrics` already exists is when the
// `captureTraces` property is present and set to the result of the boolean
// `reporting` option on the legacy (V1) server options, here:
// https://git.io/Jfmsb. I suspect this disappears when this is the direct
// entry into request processing, rather than through, e.g. `runHttpQuery`.
const metrics = requestContext.metrics =
requestContext.metrics || Object.create(null); |
<<<<<<<
import { Logger } from "apollo-server-types";
import {
plugin as pluginCacheControl,
CacheControlExtensionOptions,
} from 'apollo-cache-control';
=======
import { Logger, SchemaHash } from "apollo-server-types";
import { getEngineApiKey, getEngineGraphVariant } from "apollo-engine-reporting/dist/agent";
>>>>>>>
import { Logger, SchemaHash } from "apollo-server-types";
import {
plugin as pluginCacheControl,
CacheControlExtensionOptions,
} from 'apollo-cache-control';
import { getEngineApiKey, getEngineGraphVariant } from "apollo-engine-reporting/dist/agent"; |
<<<<<<<
* An expression which is used for base URI in runtime code.
*/
baseURI?: string;
/**
* The callback function name used by webpack for loading of chunks in WebWorkers.
=======
* Add charset attribute for script tag.
>>>>>>>
* An expression which is used for base URI in runtime code.
*/
baseURI?: string;
/**
* Add charset attribute for script tag.
<<<<<<<
* An expression which is used for base URI in runtime code.
*/
baseURI?: string;
/**
* The callback function name used by webpack for loading of chunks in WebWorkers.
=======
* Add charset attribute for script tag.
>>>>>>>
* An expression which is used for base URI in runtime code.
*/
baseURI?: string;
/**
* Add charset attribute for script tag.
<<<<<<<
declare class SimpleRuntimeModule extends RuntimeModule {
constructor(name: string, runtimeGlobal: string, expression: string);
runtimeGlobal: string;
expression: string;
}
declare interface Snapshot {
startTime?: number;
fileTimestamps?: Map<string, FileSystemInfoEntry>;
fileHashes?: Map<string, string>;
contextTimestamps?: Map<string, FileSystemInfoEntry>;
contextHashes?: Map<string, string>;
missingExistence?: Map<string, boolean>;
managedItemInfo?: Map<string, string>;
children?: Set<Snapshot>;
=======
declare class SizeOnlySource extends Source {
constructor(size: number);
}
declare abstract class Snapshot {
startTime: number;
fileTimestamps: Map<string, FileSystemInfoEntry>;
fileHashes: Map<string, string>;
fileTshs: Map<string, string | TimestampAndHash>;
contextTimestamps: Map<string, FileSystemInfoEntry>;
contextHashes: Map<string, string>;
contextTshs: Map<string, string | TimestampAndHash>;
missingExistence: Map<string, boolean>;
managedItemInfo: Map<string, string>;
managedFiles: Set<string>;
managedContexts: Set<string>;
managedMissing: Set<string>;
children: Set<Snapshot>;
hasStartTime(): boolean;
setStartTime(value?: any): void;
setMergedStartTime(value?: any, snapshot?: any): void;
hasFileTimestamps(): boolean;
setFileTimestamps(value?: any): void;
hasFileHashes(): boolean;
setFileHashes(value?: any): void;
hasFileTshs(): boolean;
setFileTshs(value?: any): void;
hasContextTimestamps(): boolean;
setContextTimestamps(value?: any): void;
hasContextHashes(): boolean;
setContextHashes(value?: any): void;
hasContextTshs(): boolean;
setContextTshs(value?: any): void;
hasMissingExistence(): boolean;
setMissingExistence(value?: any): void;
hasManagedItemInfo(): boolean;
setManagedItemInfo(value?: any): void;
hasManagedFiles(): boolean;
setManagedFiles(value?: any): void;
hasManagedContexts(): boolean;
setManagedContexts(value?: any): void;
hasManagedMissing(): boolean;
setManagedMissing(value?: any): void;
hasChildren(): boolean;
setChildren(value?: any): void;
addChild(child?: any): void;
serialize(__0: { write: any }): void;
deserialize(__0: { read: any }): void;
getFileIterable(): Iterable<string>;
getContextIterable(): Iterable<string>;
getMissingIterable(): Iterable<string>;
}
/**
* Options affecting how file system snapshots are created and validated.
*/
declare interface SnapshotOptions {
/**
* Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
*/
buildDependencies?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
/**
* List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
*/
immutablePaths?: string[];
/**
* List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
*/
managedPaths?: string[];
/**
* Options for snapshotting dependencies of modules to determine if they need to be built again.
*/
module?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
/**
* Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
*/
resolve?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
/**
* Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
*/
resolveBuildDependencies?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
>>>>>>>
declare class SimpleRuntimeModule extends RuntimeModule {
constructor(name: string, runtimeGlobal: string, expression: string);
runtimeGlobal: string;
expression: string;
}
declare class SizeOnlySource extends Source {
constructor(size: number);
}
declare abstract class Snapshot {
startTime: number;
fileTimestamps: Map<string, FileSystemInfoEntry>;
fileHashes: Map<string, string>;
fileTshs: Map<string, string | TimestampAndHash>;
contextTimestamps: Map<string, FileSystemInfoEntry>;
contextHashes: Map<string, string>;
contextTshs: Map<string, string | TimestampAndHash>;
missingExistence: Map<string, boolean>;
managedItemInfo: Map<string, string>;
managedFiles: Set<string>;
managedContexts: Set<string>;
managedMissing: Set<string>;
children: Set<Snapshot>;
hasStartTime(): boolean;
setStartTime(value?: any): void;
setMergedStartTime(value?: any, snapshot?: any): void;
hasFileTimestamps(): boolean;
setFileTimestamps(value?: any): void;
hasFileHashes(): boolean;
setFileHashes(value?: any): void;
hasFileTshs(): boolean;
setFileTshs(value?: any): void;
hasContextTimestamps(): boolean;
setContextTimestamps(value?: any): void;
hasContextHashes(): boolean;
setContextHashes(value?: any): void;
hasContextTshs(): boolean;
setContextTshs(value?: any): void;
hasMissingExistence(): boolean;
setMissingExistence(value?: any): void;
hasManagedItemInfo(): boolean;
setManagedItemInfo(value?: any): void;
hasManagedFiles(): boolean;
setManagedFiles(value?: any): void;
hasManagedContexts(): boolean;
setManagedContexts(value?: any): void;
hasManagedMissing(): boolean;
setManagedMissing(value?: any): void;
hasChildren(): boolean;
setChildren(value?: any): void;
addChild(child?: any): void;
serialize(__0: { write: any }): void;
deserialize(__0: { read: any }): void;
getFileIterable(): Iterable<string>;
getContextIterable(): Iterable<string>;
getMissingIterable(): Iterable<string>;
}
/**
* Options affecting how file system snapshots are created and validated.
*/
declare interface SnapshotOptions {
/**
* Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
*/
buildDependencies?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
/**
* List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
*/
immutablePaths?: string[];
/**
* List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
*/
managedPaths?: string[];
/**
* Options for snapshotting dependencies of modules to determine if they need to be built again.
*/
module?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
/**
* Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
*/
resolve?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
};
/**
* Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
*/
resolveBuildDependencies?: {
/**
* Use hashes of the content of the files/directories to determine invalidation.
*/
hash?: boolean;
/**
* Use timestamps of the files/directories to determine invalidation.
*/
timestamp?: boolean;
}; |
<<<<<<<
it('applies the formatResponse function', () => {
const app = createApp({apolloOptions: {
schema: Schema,
formatResponse(response) {
response['extensions'] = { it: 'works' }; return response;
},
}});
const expected = { it: 'works' };
const req = request(app)
.post('/graphql')
.send({
query: 'mutation test($echo: String){ testMutation(echo: $echo) }',
variables: { echo: 'world' },
});
return req.then((res) => {
expect(res.status).to.equal(200);
return expect(res.body.extensions).to.deep.equal(expected);
});
=======
it('passes the context to the resolver', () => {
let results;
const expected = 'it works';
const app = createApp({apolloOptions: {
schema: Schema,
context: () => results = expected,
}});
const req = request(app)
.post('/graphql')
.send({
query: 'query test{ testString }',
});
return req.then((res) => {
expect(res.status).to.equal(200);
return expect(results).to.equal(expected);
});
});
>>>>>>>
it('applies the formatResponse function', () => {
const app = createApp({apolloOptions: {
schema: Schema,
formatResponse(response) {
response['extensions'] = { it: 'works' }; return response;
},
}});
const expected = { it: 'works' };
const req = request(app)
.post('/graphql')
.send({
query: 'mutation test($echo: String){ testMutation(echo: $echo) }',
variables: { echo: 'world' },
});
return req.then((res) => {
expect(res.status).to.equal(200);
return expect(res.body.extensions).to.deep.equal(expected);
});
});
it('passes the context to the resolver', () => {
let results;
const expected = 'it works';
const app = createApp({apolloOptions: {
schema: Schema,
context: () => results = expected,
}});
const req = request(app)
.post('/graphql')
.send({
query: 'query test{ testString }',
});
return req.then((res) => {
expect(res.status).to.equal(200);
return expect(results).to.equal(expected);
});
}); |
<<<<<<<
resolverFactory: ResolverFactory;
resolveDependencies(fs?: any, options?: any, callback?: any): any;
=======
resolverFactory: any;
resolveDependencies(
fs: InputFileSystem,
options: {
mode: "sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once";
recursive: boolean;
regExp: RegExp;
namespaceObject?: boolean | "strict";
addon?: string;
chunkName?: string;
include?: RegExp;
exclude?: RegExp;
groupOptions?: RawChunkGroupOptions;
/**
* exports referenced from modules (won't be mangled)
*/
referencedExports?: string[][];
resource: string;
resourceQuery?: string;
resolveOptions: any;
},
callback: (err?: Error, dependencies?: ContextElementDependency[]) => any
): void;
>>>>>>>
resolverFactory: ResolverFactory;
resolveDependencies(
fs: InputFileSystem,
options: {
mode: "sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once";
recursive: boolean;
regExp: RegExp;
namespaceObject?: boolean | "strict";
addon?: string;
chunkName?: string;
include?: RegExp;
exclude?: RegExp;
groupOptions?: RawChunkGroupOptions;
/**
* exports referenced from modules (won't be mangled)
*/
referencedExports?: string[][];
resource: string;
resourceQuery?: string;
resolveOptions: any;
},
callback: (err?: Error, dependencies?: ContextElementDependency[]) => any
): void; |
<<<<<<<
it('should support custom template refs', () => {
let source = `
@Component({
selector: 'foobar',
template: '<form #todoForm="bar"><button [disabled]="!todoForm.form.valid"></button></form>'
})
class Test {
foo: number;
}`;
assertSuccess('no-access-missing-member', source, [{
directives: [{ selector: 'baz', exportAs: 'bar' }]
}]);
});
=======
it('should succeed with inline property declaration', () => {
let source = `
@Component({
selector: 'foobar',
template: '{{ foo }}'
})
class Test {
constructor(public foo: number) {}
}`;
assertSuccess('no-access-missing-member', source);
});
>>>>>>>
it('should support custom template refs', () => {
let source = `
@Component({
selector: 'foobar',
template: '<form #todoForm="bar"><button [disabled]="!todoForm.form.valid"></button></form>'
})
class Test {
foo: number;
}`;
assertSuccess('no-access-missing-member', source, [{
directives: [{ selector: 'baz', exportAs: 'bar' }]
}]);
});
it('should succeed with inline property declaration', () => {
let source = `
@Component({
selector: 'foobar',
template: '{{ foo }}'
})
class Test {
constructor(public foo: number) {}
}`;
assertSuccess('no-access-missing-member', source);
}); |
<<<<<<<
import { ClusterName, RootState } from 'redux/interfaces';
=======
import Details from './Details';
import {
ClusterName,
RootState,
TopicName
} from 'redux/interfaces';
>>>>>>>
import { ClusterName, RootState, TopicName } from 'redux/interfaces'; |
<<<<<<<
import { fetchTopicList } from 'redux/actions';
=======
import { fetchTopicsList } from 'redux/actions';
import Topics from './Topics';
>>>>>>>
import { fetchTopicsList } from 'redux/actions'; |
<<<<<<<
underReplicatedPartitionCount: brokerSelectors.getUnderReplicatedPartitionCount(state)
=======
inSyncReplicasCount: brokerSelectors.getInSyncReplicasCount(state),
outOfSyncReplicasCount: brokerSelectors.getOutOfSyncReplicasCount(state),
underReplicatedPartitionCount: brokerSelectors.getUnderReplicatedPartitionCount(state),
diskUsageDistribution: brokerSelectors.getDiskUsageDistribution(state),
minDiskUsage: brokerSelectors.getMinDiskUsage(state),
maxDiskUsage: brokerSelectors.getMaxDiskUsage(state),
>>>>>>>
inSyncReplicasCount: brokerSelectors.getInSyncReplicasCount(state),
outOfSyncReplicasCount: brokerSelectors.getOutOfSyncReplicasCount(state),
underReplicatedPartitionCount: brokerSelectors.getUnderReplicatedPartitionCount(state) |
<<<<<<<
}
// StructurePortal
{
const portals = room.find<StructurePortal>(FIND_STRUCTURES, {filter: (s) => s.structureType === STRUCTURE_PORTAL});
portals.forEach((p: StructurePortal) => {
const state = p.ticksToDecay === undefined ? 'stable' : 'unstable';
if (p.destination instanceof RoomPosition) {
Game.notify(`Found ${state} inter-room portal to ${p.destination}`);
} else {
Game.notify(`Found ${state} inter-shard portal to ${p.destination.shard} ${p.destination.room}`);
}
});
=======
}
// ConstructionSite
{
room.createConstructionSite(10, 10, STRUCTURE_EXTENSION);
room.createConstructionSite(10, 11, STRUCTURE_SPAWN, "mySpawn");
const pos = new RoomPosition(10, 10, room.name);
room.createConstructionSite(pos, STRUCTURE_EXTENSION);
room.createConstructionSite(pos, STRUCTURE_SPAWN, "mySpawn");
pos.createConstructionSite(STRUCTURE_EXTENSION);
pos.createConstructionSite(STRUCTURE_SPAWN, "mySpawn");
>>>>>>>
}
// StructurePortal
{
const portals = room.find<StructurePortal>(FIND_STRUCTURES, {filter: (s) => s.structureType === STRUCTURE_PORTAL});
portals.forEach((p: StructurePortal) => {
const state = p.ticksToDecay === undefined ? 'stable' : 'unstable';
if (p.destination instanceof RoomPosition) {
Game.notify(`Found ${state} inter-room portal to ${p.destination}`);
} else {
Game.notify(`Found ${state} inter-shard portal to ${p.destination.shard} ${p.destination.room}`);
}
});
}
// ConstructionSite
{
room.createConstructionSite(10, 10, STRUCTURE_EXTENSION);
room.createConstructionSite(10, 11, STRUCTURE_SPAWN, "mySpawn");
const pos = new RoomPosition(10, 10, room.name);
room.createConstructionSite(pos, STRUCTURE_EXTENSION);
room.createConstructionSite(pos, STRUCTURE_SPAWN, "mySpawn");
pos.createConstructionSite(STRUCTURE_EXTENSION);
pos.createConstructionSite(STRUCTURE_SPAWN, "mySpawn"); |
<<<<<<<
/**
* Estimate the energy transaction cost of StructureTerminal.send and Market.deal methods.
*/
calcTransactionCost(amount: number, roomName1: string, roomName2: string): number;
/**
* Cancel a previously created order. The 5% fee is not returned.
*/
cancelOrder(orderId: string): number;
/**
* Create a market order in your terminal. You will be charged price*amount*0.05 credits when the order is placed.
* The maximum orders count is 20 per player. You can create an order at any time with any amount,
* it will be automatically activated and deactivated depending on the resource/credits availability.
*/
createOrder(type: string, resourceType: string, price: number, totalAmount: number, roomName?: string): number;
/**
* Execute a trade deal from your Terminal to another player's Terminal using the specified buy/sell order.
* Your Terminal will be charged energy units of transfer cost regardless of the order resource type.
* You can use Game.market.calcTransactionCost method to estimate it.
* When multiple players try to execute the same deal, the one with the shortest distance takes precedence.
*/
deal(orderId: string, amount: number, targetRoomName?: string): number;
/**
* Get other players' orders currently active on the market.
*/
getAllOrders(filter?: OrderFilter | ((o: Order) => boolean)): Order[];
=======
/**
* Estimate the energy transaction cost of StructureTerminal.send and Market.deal methods. The formula: Math.ceil( amount * (Math.log(0.1*linearDistanceBetweenRooms + 0.9) + 0.1) )
* @param amount Amount of resources to be sent.
* @param roomName1 The name of the first room.
* @param roomName2 The name of the second room.
* @returns The amount of energy required to perform the transaction.
*/
calcTransactionCost(amount:number, roomName1:string, roomName2:string): number;
/**
* Cancel a previously created order. The 5% fee is not returned.
* @param orderId The order ID as provided in Game.market.orders
* @returns Result Code: OK, ERR_INVALID_ARGS
*/
cancelOrder(orderId: string): number;
/**
* Change the price of an existing order. If newPrice is greater than old price, you will be charged (newPrice-oldPrice)*remainingAmount*0.05 credits.
* @param orderId The order ID as provided in Game.market.orders
* @param newPrice The new order price.
* @returns Result Code: OK, ERR_NOT_OWNER, ERR_NOT_ENOUGH_RESOURCES, ERR_INVALID_ARGS
*/
changeOrderPrice(orderId: string, newPrice:number): number;
/**
* Add more capacity to an existing order. It will affect remainingAmount and totalAmount properties. You will be charged price*addAmount*0.05 credits.
* @param orderId The order ID as provided in Game.market.orders
* @param addAmount How much capacity to add. Cannot be a negative value.
* @returns Result Code: OK, ERR_NOT_ENOUGH_RESOURCES, ERR_INVALID_ARGS
*/
extendOrder(orderId: string, addAmount: number): number;
/**
* Get other players' orders currently active on the market.
* @param filter (optional) An object or function that will filter the resulting list using the lodash.filter method.
* @returns An array of objects containing order information.
*/
getAllOrders(filter: any): [Order];
/**
* Retrieve info for specific market order.
* @param orderId The order ID
* @returns An object with the order info. See getAllOrders for properties explanation.
*/
getOrderById(id: string): Order;
>>>>>>>
/**
* Estimate the energy transaction cost of StructureTerminal.send and Market.deal methods. The formula: Math.ceil( amount * (Math.log(0.1*linearDistanceBetweenRooms + 0.9) + 0.1) )
* @param amount Amount of resources to be sent.
* @param roomName1 The name of the first room.
* @param roomName2 The name of the second room.
* @returns The amount of energy required to perform the transaction.
*/
calcTransactionCost(amount:number, roomName1:string, roomName2:string): number;
/**
* Cancel a previously created order. The 5% fee is not returned.
* @param orderId The order ID as provided in Game.market.orders
* @returns Result Code: OK, ERR_INVALID_ARGS
*/
cancelOrder(orderId: string): number;
/**
* Change the price of an existing order. If newPrice is greater than old price, you will be charged (newPrice-oldPrice)*remainingAmount*0.05 credits.
* @param orderId The order ID as provided in Game.market.orders
* @param newPrice The new order price.
* @returns Result Code: OK, ERR_NOT_OWNER, ERR_NOT_ENOUGH_RESOURCES, ERR_INVALID_ARGS
*/
changeOrderPrice(orderId: string, newPrice:number): number;
/**
* Create a market order in your terminal. You will be charged price*amount*0.05 credits when the order is placed.
* The maximum orders count is 20 per player. You can create an order at any time with any amount,
* it will be automatically activated and deactivated depending on the resource/credits availability.
*/
createOrder(type: string, resourceType: string, price: number, totalAmount: number, roomName?: string): number;
/**
* Execute a trade deal from your Terminal to another player's Terminal using the specified buy/sell order.
* Your Terminal will be charged energy units of transfer cost regardless of the order resource type.
* You can use Game.market.calcTransactionCost method to estimate it.
* When multiple players try to execute the same deal, the one with the shortest distance takes precedence.
*/
deal(orderId: string, amount: number, targetRoomName?: string): number;
/**
* Add more capacity to an existing order. It will affect remainingAmount and totalAmount properties. You will be charged price*addAmount*0.05 credits.
* @param orderId The order ID as provided in Game.market.orders
* @param addAmount How much capacity to add. Cannot be a negative value.
* @returns Result Code: OK, ERR_NOT_ENOUGH_RESOURCES, ERR_INVALID_ARGS
*/
extendOrder(orderId: string, addAmount: number): number;
/**
* Get other players' orders currently active on the market.
* @param filter (optional) An object or function that will filter the resulting list using the lodash.filter method.
* @returns An array of objects containing order information.
*/
getAllOrders(filter?: OrderFilter | ((o: Order) => boolean)): Order[];
/**
* Retrieve info for specific market order.
* @param orderId The order ID
* @returns An object with the order info. See getAllOrders for properties explanation.
*/
getOrderById(id: string): Order;
<<<<<<<
}
interface Order {
id: string;
created: number;
active?: boolean;
type: string;
resourceType: string;
roomName?: string;
amount: number;
remainingAmount: number;
totalAmount?: number;
price: number;
}
interface OrderFilter {
id?: string;
created?: number;
type?: string;
resourceType?: string;
roomName?: string;
amount?: number;
remainingAmount?: number;
price?: number;
=======
}
interface Order {
id: string;
created: number;
type: string;
resourceType: string;
roomName: string;
amount: number;
remainingAmount: number;
price: number;
>>>>>>>
}
interface Order {
id: string;
created: number;
active?: boolean;
type: string;
resourceType: string;
roomName?: string;
amount: number;
remainingAmount: number;
totalAmount?: number;
price: number;
}
interface OrderFilter {
id?: string;
created?: number;
type?: string;
resourceType?: string;
roomName?: string;
amount?: number;
remainingAmount?: number;
price?: number; |
<<<<<<<
OS: ${process.platform}
`;
const baseUrl: string = bugsUrl || `https://github.com/Microsoft/${extensionName}/issues`;
const url: string = `${baseUrl}/new?body=${encodeURIComponent(body)}`;
=======
OS: ${process.platform}`;
if (parsedError.stack) {
body = body.concat(`
<details>
<summary>Call Stack</summary>
\`\`\`
${parsedError.stack}
\`\`\`
</details>`);
}
>>>>>>>
OS: ${process.platform}`;
if (parsedError.stack) {
body = body.concat(`
<details>
<summary>Call Stack</summary>
\`\`\`
${parsedError.stack}
\`\`\`
</details>`);
}
const baseUrl: string = bugsUrl || `https://github.com/Microsoft/${extensionName}/issues`;
const url: string = `${baseUrl}/new?body=${encodeURIComponent(body)}`; |
<<<<<<<
describe('DOM tests:', () => {
it('should display the correct number of items per page (10)',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
fixture.detectChanges();
expect(getListItems(fixture).length).toBe(10);
});
}));
it('should display the correct number of items per page (50)',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
instance.config.itemsPerPage = 50;
fixture.detectChanges();
expect(getListItems(fixture).length).toBe(50);
});
}));
it('should display the correct items on init',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
instance.config.itemsPerPage = 3;
fixture.detectChanges();
let expected = ['item 1', 'item 2', 'item 3'];
expect(getListItemsText(fixture)).toEqual(expected);
});
}));
it('should not mutate the collection',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
expect(instance.collection.length).toBe(100);
instance.itemsPerPage = 50;
fixture.detectChanges();
expect(instance.collection.length).toBe(100);
instance.itemsPerPage = 75;
fixture.detectChanges();
expect(instance.collection.length).toBe(100);
});
}));
it('should default to page 1 if currentPage not set',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
instance.config.itemsPerPage = 3;
instance.config.currentPage = undefined;
fixture.detectChanges();
let expected = ['item 1', 'item 2', 'item 3'];
expect(getListItemsText(fixture)).toEqual(expected);
});
}));
});
=======
describe('collection modification', () => {
it('should detect simple push or splice without insert', () => {
collection = ['1', '2', '3'];
let result1 = pipe.transform(collection, ['10']);
expect(result1.length).toBe(3);
collection.push('4');
let result2 = pipe.transform(collection, ['10']);
expect(result2.length).toBe(4);
collection.splice(3, 1); // remove 4th
let result3 = pipe.transform(collection, ['10']);
expect(result3.length).toBe(3);
});
});
>>>>>>>
describe('DOM tests:', () => {
it('should display the correct number of items per page (10)',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
fixture.detectChanges();
expect(getListItems(fixture).length).toBe(10);
});
}));
it('should display the correct number of items per page (50)',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
instance.config.itemsPerPage = 50;
fixture.detectChanges();
expect(getListItems(fixture).length).toBe(50);
});
}));
it('should display the correct items on init',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
instance.config.itemsPerPage = 3;
fixture.detectChanges();
let expected = ['item 1', 'item 2', 'item 3'];
expect(getListItemsText(fixture)).toEqual(expected);
});
}));
it('should not mutate the collection',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
expect(instance.collection.length).toBe(100);
instance.itemsPerPage = 50;
fixture.detectChanges();
expect(instance.collection.length).toBe(100);
instance.itemsPerPage = 75;
fixture.detectChanges();
expect(instance.collection.length).toBe(100);
});
}));
it('should default to page 1 if currentPage not set',
injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb.createAsync(TestCmp)
.then((fixture: ComponentFixture) => {
let instance: TestCmp = fixture.componentInstance;
instance.config.itemsPerPage = 3;
instance.config.currentPage = undefined;
fixture.detectChanges();
let expected = ['item 1', 'item 2', 'item 3'];
expect(getListItemsText(fixture)).toEqual(expected);
});
}));
});
let result1 = pipe.transform(collection, ['10']);
expect(result1.length).toBe(3);
collection.push('4');
let result2 = pipe.transform(collection, ['10']);
expect(result2.length).toBe(4);
collection.splice(3, 1); // remove 4th
let result3 = pipe.transform(collection, ['10']);
expect(result3.length).toBe(3);
});
}); |
<<<<<<<
const TRANSACTION_TEMPLATE_ID_PLACEHOLDER: string = '{TRANSACTION_ID}';
export enum SupportedChains {
Bitcoin = 'bitcoin',
Ethmain = 'ethmain',
Ethropst = 'ethropst',
Ethrinkeby = 'ethrinkeby',
Mocknet = 'mocknet',
Regtest = 'regtest',
Testnet = 'testnet'
}
export interface IBlockchainObject {
code: SupportedChains;
name: string;
prefixes?: string[];
test?: boolean;
signatureValue: string;
transactionTemplates: {
full: string;
raw: string;
}
}
const BLOCKCHAINS: {[chain in SupportedChains]: IBlockchainObject} = {
[SupportedChains.Bitcoin]: {
code: SupportedChains.Bitcoin,
=======
import { TRANSACTION_ID_PLACEHOLDER } from './api';
const BLOCKCHAINS = {
bitcoin: {
code: 'bitcoin',
>>>>>>>
import { TRANSACTION_ID_PLACEHOLDER } from './api';
export enum SupportedChains {
Bitcoin = 'bitcoin',
Ethmain = 'ethmain',
Ethropst = 'ethropst',
Ethrinkeby = 'ethrinkeby',
Mocknet = 'mocknet',
Regtest = 'regtest',
Testnet = 'testnet'
}
export interface IBlockchainObject {
code: SupportedChains;
name: string;
prefixes?: string[];
test?: boolean;
signatureValue: string;
transactionTemplates: {
full: string;
raw: string;
}
}
const BLOCKCHAINS: {[chain in SupportedChains]: IBlockchainObject} = {
[SupportedChains.Bitcoin]: {
code: SupportedChains.Bitcoin, |
<<<<<<<
const hasOwn = {}.hasOwnProperty;
const classNames = (...args: any[]) => {
const classes = [];
let length = args.length;
while (length--) {
let arg = args[length];
if (!arg) continue;
let argType = typeof arg;
if (argType === 'string' || argType === 'number') {
classes.push(arg);
} else if (Array.isArray(arg)) {
classes.push(classNames.apply(null, arg));
} else if (argType === 'object') {
const keys = Object.keys(arg);
let length = keys.length;
while (length--) {
let key = keys[length];
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
}
}
return classes.join(' ');
};
const renameEvent = (eventName: string) => {
switch (eventName) {
case 'keypress':
return 'keyPress';
case 'keyup':
return 'keyUp';
case 'keydown':
return 'keyDown';
case 'beforeinput':
return 'beforeInput';
case 'compositionstart':
return 'compositionStart';
case 'compositionupdate':
return 'compositionUpdate';
case 'compositionend':
return 'compositionEnd';
case 'dblclick':
return 'doubleClick';
case 'mousedown':
return 'mouseDown';
case 'mouseenter':
return 'mouseEnter';
case 'mouseleave':
return 'mouseLeave';
case 'mousemove':
return 'mouseMove';
case 'mouseout':
return 'mouseOut';
case 'mouseover':
return 'mouseOver';
case 'mouseup':
return 'mouseUp';
case 'focusin':
return 'focus';
case 'focusout':
return 'blur'
default:
return eventName;
}
}
=======
>>>>>>>
const hasOwn = {}.hasOwnProperty;
const classNames = (...args: any[]) => {
const classes = [];
let length = args.length;
while (length--) {
let arg = args[length];
if (!arg) continue;
let argType = typeof arg;
if (argType === 'string' || argType === 'number') {
classes.push(arg);
} else if (Array.isArray(arg)) {
classes.push(classNames.apply(null, arg));
} else if (argType === 'object') {
const keys = Object.keys(arg);
let length = keys.length;
while (length--) {
let key = keys[length];
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
}
}
return classes.join(' ');
};
const renameEvent = (eventName: string) => {
switch (eventName) {
case 'keypress':
return 'keyPress';
case 'keyup':
return 'keyUp';
case 'keydown':
return 'keyDown';
case 'beforeinput':
return 'beforeInput';
case 'compositionstart':
return 'compositionStart';
case 'compositionupdate':
return 'compositionUpdate';
case 'compositionend':
return 'compositionEnd';
case 'dblclick':
return 'doubleClick';
case 'mousedown':
return 'mouseDown';
case 'mouseenter':
return 'mouseEnter';
case 'mouseleave':
return 'mouseLeave';
case 'mousemove':
return 'mouseMove';
case 'mouseout':
return 'mouseOut';
case 'mouseover':
return 'mouseOver';
case 'mouseup':
return 'mouseUp';
case 'focusin':
return 'focus';
case 'focusout':
return 'blur'
default:
return eventName;
}
}
<<<<<<<
Object.keys(eventHandlers).forEach(eventName => {
const camelCasedEventName = `${camelCase('on-' + renameEvent(eventName))}`;
=======
for (let eventName in eventHandlers) {
const camelCasedEventName = `${camelCase('on-' + eventName)}`;
>>>>>>>
for (let eventName in eventHandlers) {
const camelCasedEventName = `${camelCase('on-' + renameEvent(eventName))}`; |
<<<<<<<
assert(!errors.length);
=======
writeLogSync("validate-errors.md", errors);
>>>>>>>
writeLogSync("validate-errors.md", errors);
<<<<<<<
log.info("");
log.info(`Failed packages: ${JSON.stringify(failed)}`);
=======
log.info(`These packages failed: ${failed}`);
>>>>>>>
log.info("");
log.info(`These packages failed: ${failed}`); |
<<<<<<<
export async function readNotNeededPackages(options: Options): Promise<ReadonlyArray<NotNeededPackage>> {
const raw = await readJson(notNeededPackagesPath(options)) as { packages: ReadonlyArray<NotNeededPackageRaw> };
return raw.packages.map(raw => new NotNeededPackage(raw));
}
/** Path to the *root* for a given package. Path to a particular version may differ. */
export function packageRootPath(packageName: string, options: Options): string {
return joinPaths(options.typesPath, packageName);
=======
async function readNotNeededPackages(options: Options): Promise<NotNeededPackageRaw[]> {
return (await readJson(notNeededPackagesPath(options))).packages;
>>>>>>>
export async function readNotNeededPackages(options: Options): Promise<ReadonlyArray<NotNeededPackage>> {
const raw = await readJson(notNeededPackagesPath(options)) as { packages: ReadonlyArray<NotNeededPackageRaw> };
return raw.packages.map(raw => new NotNeededPackage(raw)); |
<<<<<<<
this.error = null
this.basketService.find(sessionStorage.getItem('bid')).subscribe((basket) => {
=======
this.basketService.find(Number(sessionStorage.getItem('bid'))).subscribe((basket) => {
>>>>>>>
this.error = null
this.basketService.find(Number(sessionStorage.getItem('bid'))).subscribe((basket) => { |
<<<<<<<
import { OrderHistoryComponent } from './order-history/order-history.component'
import { OrderHistoryService } from './Services/order-history.service'
=======
import { DeliveryMethodComponent } from './delivery-method/delivery-method.component'
import { DeliveryService } from './Services/delivery.service'
>>>>>>>
import { OrderHistoryComponent } from './order-history/order-history.component'
import { OrderHistoryService } from './Services/order-history.service'
import { DeliveryMethodComponent } from './delivery-method/delivery-method.component'
import { DeliveryService } from './Services/delivery.service'
<<<<<<<
ChallengeStatusBadgeComponent,
OrderHistoryComponent
=======
ChallengeStatusBadgeComponent,
DeliveryMethodComponent
>>>>>>>
ChallengeStatusBadgeComponent,
OrderHistoryComponent,
DeliveryMethodComponent
<<<<<<<
QuantityService,
OrderHistoryService
=======
QuantityService,
DeliveryService
>>>>>>>
QuantityService,
OrderHistoryService,
DeliveryService |
<<<<<<<
import { WalletComponent } from './wallet/wallet.component'
import { WalletService } from './Services/wallet.service'
=======
import { OrderHistoryComponent } from './order-history/order-history.component'
import { OrderHistoryService } from './Services/order-history.service'
import { DeliveryMethodComponent } from './delivery-method/delivery-method.component'
import { DeliveryService } from './Services/delivery.service'
>>>>>>>
import { WalletComponent } from './wallet/wallet.component'
import { WalletService } from './Services/wallet.service'
import { OrderHistoryComponent } from './order-history/order-history.component'
import { OrderHistoryService } from './Services/order-history.service'
import { DeliveryMethodComponent } from './delivery-method/delivery-method.component'
import { DeliveryService } from './Services/delivery.service'
<<<<<<<
ChallengeStatusBadgeComponent,
WalletComponent
=======
ChallengeStatusBadgeComponent,
OrderHistoryComponent,
DeliveryMethodComponent
>>>>>>>
ChallengeStatusBadgeComponent,
WalletComponent,
OrderHistoryComponent,
DeliveryMethodComponent
<<<<<<<
QuantityService,
WalletService
=======
QuantityService,
OrderHistoryService,
DeliveryService
>>>>>>>
QuantityService,
WalletService,
OrderHistoryService,
DeliveryService |
<<<<<<<
import { QuantityService } from '../Services/quantity.service'
=======
import { Product } from '../Models/product.model'
>>>>>>>
import { Product } from '../Models/product.model'
import { QuantityService } from '../Services/quantity.service'
<<<<<<<
let dialog
let sanitizer
let socketIoService
let mockSocket
let quantityService
=======
let dialog: any
let sanitizer: any
let socketIoService: any
let mockSocket: any
>>>>>>>
let dialog: any
let sanitizer: any
let socketIoService: any
let mockSocket: any
let quantityService |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.