conflict_resolution
stringlengths
27
16k
<<<<<<< import {RETRO_PHASE_ITEM} from 'parabol-client/utils/constants' import getRethink from '../../database/rethinkDriver' import db from '../../db' import getTemplateScore from '../../utils/getTemplateScore' ======= >>>>>>> import getRethink from '../../database/rethinkDriver' import db from '../../db' import getTemplateScore from '../../utils/getTemplateScore' <<<<<<< import CustomPhaseItem from './CustomPhaseItem' import ReflectTemplate, {ReflectTemplateConnection} from './ReflectTemplate' import TeamMeetingSettings, {teamMeetingSettingsFields} from './TeamMeetingSettings' const getPublicScoredTemplates = async (templates: {createdAt: Date; id: string}[]) => { const sharedTemplateIds = templates.map(({id}) => id) const sharedTemplateEndTimes = await db.readMany('endTimesByTemplateId', sharedTemplateIds) const scoreByTemplateId = {} as {[templateId: string]: number} const starterTemplates = new Set([ 'sailboatTemplate', 'startStopContinueTemplate', 'workingStuckTemplate', 'fourLsTemplate', 'GladSadMadTemplate' ]) templates.forEach((template, idx) => { const {id: templateId, createdAt} = template const endTimes = sharedTemplateEndTimes[idx] const starterBonus = starterTemplates.has(templateId) ? 100 : 0 const minUsagePenalty = sharedTemplateEndTimes.length < 10 && !starterBonus scoreByTemplateId[templateId] = minUsagePenalty ? -1 : getTemplateScore(createdAt, endTimes, 0.2) + starterBonus }) // mutative, but doesn't matter if we change the sort oder templates.sort((a, b) => { return scoreByTemplateId[a.id] > scoreByTemplateId[b.id] ? -1 : 1 }) return templates } const getScoredTemplates = async ( templates: {createdAt: Date; id: string}[], newHotnessFactor: number ) => { const sharedTemplateIds = templates.map(({id}) => id) const sharedTemplateEndTimes = await db.readMany('endTimesByTemplateId', sharedTemplateIds) const scoreByTemplateId = {} as {[templateId: string]: number} templates.forEach((template, idx) => { const {id: templateId, createdAt} = template const endTimes = sharedTemplateEndTimes[idx] scoreByTemplateId[templateId] = getTemplateScore(createdAt, endTimes, newHotnessFactor) }) // mutative, but doesn't matter if we change the sort oder templates.sort((a, b) => { return scoreByTemplateId[a.id] > scoreByTemplateId[b.id] ? -1 : 1 }) return templates } const connectionFromTemplateArray = ( scoredTemplates: {createdAt: Date; id: string}[], first: number, after: string ) => { const startIdx = after ? scoredTemplates.findIndex((template) => template.id === after) : 0 const safeStartIdx = startIdx === -1 ? 0 : startIdx const nodes = scoredTemplates.slice(safeStartIdx, first) const edges = nodes.map((node) => ({ cursor: node.id, node })) const firstEdge = edges[0] return { edges, pageInfo: { startCursor: firstEdge && firstEdge.cursor, endCursor: firstEdge ? edges[edges.length - 1].cursor : '', hasNextPage: scoredTemplates.length > nodes.length } } } ======= import ReflectTemplate from './ReflectTemplate' import TeamMeetingSettings, {teamMeetingSettingsFields} from './TeamMeetingSettings' >>>>>>> import ReflectTemplate, {ReflectTemplateConnection} from './ReflectTemplate' import TeamMeetingSettings, {teamMeetingSettingsFields} from './TeamMeetingSettings' const getPublicScoredTemplates = async (templates: {createdAt: Date; id: string}[]) => { const sharedTemplateIds = templates.map(({id}) => id) const sharedTemplateEndTimes = await db.readMany('endTimesByTemplateId', sharedTemplateIds) const scoreByTemplateId = {} as {[templateId: string]: number} const starterTemplates = new Set([ 'sailboatTemplate', 'startStopContinueTemplate', 'workingStuckTemplate', 'fourLsTemplate', 'GladSadMadTemplate' ]) templates.forEach((template, idx) => { const {id: templateId, createdAt} = template const endTimes = sharedTemplateEndTimes[idx] const starterBonus = starterTemplates.has(templateId) ? 100 : 0 const minUsagePenalty = sharedTemplateEndTimes.length < 10 && !starterBonus scoreByTemplateId[templateId] = minUsagePenalty ? -1 : getTemplateScore(createdAt, endTimes, 0.2) + starterBonus }) // mutative, but doesn't matter if we change the sort oder templates.sort((a, b) => { return scoreByTemplateId[a.id] > scoreByTemplateId[b.id] ? -1 : 1 }) return templates } const getScoredTemplates = async ( templates: {createdAt: Date; id: string}[], newHotnessFactor: number ) => { const sharedTemplateIds = templates.map(({id}) => id) const sharedTemplateEndTimes = await db.readMany('endTimesByTemplateId', sharedTemplateIds) const scoreByTemplateId = {} as {[templateId: string]: number} templates.forEach((template, idx) => { const {id: templateId, createdAt} = template const endTimes = sharedTemplateEndTimes[idx] scoreByTemplateId[templateId] = getTemplateScore(createdAt, endTimes, newHotnessFactor) }) // mutative, but doesn't matter if we change the sort oder templates.sort((a, b) => { return scoreByTemplateId[a.id] > scoreByTemplateId[b.id] ? -1 : 1 }) return templates } const connectionFromTemplateArray = ( scoredTemplates: {createdAt: Date; id: string}[], first: number, after: string ) => { const startIdx = after ? scoredTemplates.findIndex((template) => template.id === after) : 0 const safeStartIdx = startIdx === -1 ? 0 : startIdx const nodes = scoredTemplates.slice(safeStartIdx, first) const edges = nodes.map((node) => ({ cursor: node.id, node })) const firstEdge = edges[0] return { edges, pageInfo: { startCursor: firstEdge && firstEdge.cursor, endCursor: firstEdge ? edges[edges.length - 1].cursor : '', hasNextPage: scoredTemplates.length > nodes.length } } }
<<<<<<< ======= const {reflectPrompts, templates} = makeRetroTemplates(teamId, base) await r({ newTemplate: r.table('ReflectTemplate').insert(templates), newReflectPrompt: r.table('ReflectPrompt').insert(reflectPrompts) }).run() const templateId = templates[0].id const data = {templateId} >>>>>>>
<<<<<<< import {RenameMeetingSuccess} from './RenameMeetingPayload' ======= import {AddReactjiToReflectionSuccess} from './AddReactjiToReflectionPayload' >>>>>>> import {RenameMeetingSuccess} from './RenameMeetingPayload' import {AddReactjiToReflectionSuccess} from './AddReactjiToReflectionPayload'
<<<<<<< import VoteForReflectionGroupPayload from './VoteForReflectionGroupPayload' ======= import {FlagReadyToAdvanceSuccess} from './FlagReadyToAdvancePayload' import EditCommentingPayload from './EditCommentingPayload' >>>>>>> import EditCommentingPayload from './EditCommentingPayload' import VoteForReflectionGroupPayload from './VoteForReflectionGroupPayload' <<<<<<< DragEstimatingTaskSuccess, EndDraggingReflectionPayload, ======= EditCommentingPayload, >>>>>>> DragEstimatingTaskSuccess, EndDraggingReflectionPayload, EditCommentingPayload,
<<<<<<< ======= return createEmailVerification(args) } const hashedPassword = await bcrypt.hash(password, Security.SALT_ROUNDS) const newUser = createNewLocalUser({email, hashedPassword, isEmailVerified: false, segmentId}) // MUTATIVE context.authToken = await bootstrapNewUser(newUser, isOrganic, segmentId) return { userId: newUser.id, authToken: encodeAuthToken(context.authToken) >>>>>>>
<<<<<<< import generateUID from '../../generateUID' ======= >>>>>>> import generateUID from '../../generateUID' <<<<<<< const {id, domain, cert, url, metadata} = input this.id = id || generateUID() this.domain = domain this.cert = cert ======= const {id, domains, url, metadata} = input this.id = id this.domains = domains >>>>>>> const {id, domains, url, metadata} = input this.id = id || generateUID() this.domains = domains
<<<<<<< import {MeetingTypeEnum} from 'parabol-client/types/graphql' ======= import {SharingScopeEnum} from '../../client/types/graphql' >>>>>>> import {MeetingTypeEnum} from 'parabol-client/types/graphql' import {SharingScopeEnum} from '../../client/types/graphql' <<<<<<< .filter({scope: 'PUBLIC', isActive: true, type: templateType}) ======= .filter({scope: SharingScopeEnum.PUBLIC, isActive: true, type}) >>>>>>> .filter({scope: SharingScopeEnum.PUBLIC, isActive: true, type: templateType})
<<<<<<< ======= /** * Upgrade an account to the paid service */ upgradeToPro: IUpgradeToProPayload | null; /** * Cast a vote for the estimated points for a given dimension */ voteForPokerStory: VoteForPokerStoryPayload; >>>>>>> /** * Cast a vote for the estimated points for a given dimension */ voteForPokerStory: VoteForPokerStoryPayload; <<<<<<< export interface IVerifyEmailPayload { __typename: 'VerifyEmailPayload'; error: IStandardMutationError | null; /** * The new auth token sent to the mutator */ authToken: string | null; userId: string | null; user: IUser | null; } export interface IVoteForReflectionGroupPayload { __typename: 'VoteForReflectionGroupPayload'; error: IStandardMutationError | null; meeting: IRetrospectiveMeeting | null; meetingMember: IRetrospectiveMeetingMember | null; reflectionGroup: IRetroReflectionGroup | null; /** * The stages that were locked or unlocked by having at least 1 vote */ unlockedStages: Array<NewMeetingStage> | null; } ======= /** * Return object for VoteForPokerStoryPayload */ export type VoteForPokerStoryPayload = | IErrorPayload | IVoteForPokerStorySuccess; export interface IVoteForPokerStorySuccess { __typename: 'VoteForPokerStorySuccess'; /** * The stage that holds the updated scores */ stage: EstimateStage; } >>>>>>> export interface IVerifyEmailPayload { __typename: 'VerifyEmailPayload'; error: IStandardMutationError | null; /** * The new auth token sent to the mutator */ authToken: string | null; userId: string | null; user: IUser | null; } export interface IVoteForReflectionGroupPayload { __typename: 'VoteForReflectionGroupPayload'; error: IStandardMutationError | null; meeting: IRetrospectiveMeeting | null; meetingMember: IRetrospectiveMeetingMember | null; reflectionGroup: IRetroReflectionGroup | null; /** * The stages that were locked or unlocked by having at least 1 vote */ unlockedStages: Array<NewMeetingStage> | null; } /** * Return object for VoteForPokerStoryPayload */ export type VoteForPokerStoryPayload = | IErrorPayload | IVoteForPokerStorySuccess; export interface IVoteForPokerStorySuccess { __typename: 'VoteForPokerStorySuccess'; /** * The stage that holds the updated scores */ stage: EstimateStage; }
<<<<<<< const updatedReflections = [] as Partial<ReflectionCard_reflection>[] ======= const updatedReflections = [] as Partial<IRetroReflection>[] const reflectionGroupMapping = {} as Record<string, string> >>>>>>> const updatedReflections = [] as Partial<ReflectionCard_reflection>[] const reflectionGroupMapping = {} as Record<string, string>
<<<<<<< import {BezierCurve} from '~/types/constEnums' ======= import {BezierCurve, Breakpoint} from 'types/constEnums' >>>>>>> import {BezierCurve, Breakpoint} from '~/types/constEnums'
<<<<<<< import StrictEventEmitter from 'strict-event-emitter-types' ======= import LinearPublishQueue from 'universal/LinearPublishQueue' >>>>>>> import StrictEventEmitter from 'strict-event-emitter-types' import LinearPublishQueue from 'universal/LinearPublishQueue' <<<<<<< interface Toast { level: 'info' | 'warning' | 'error' | 'success' autoDismiss?: number title: string message: string } interface AtmosphereEvents { addToast: Toast removeToast: (toast: string | any) => void endDraggingReflection: MasonryDragEndPayload meetingSidebarCollapsed: boolean newSubscriptionClient: void removeGitHubRepo: void } ======= const store = new Store(new RecordSource()) >>>>>>> interface Toast { level: 'info' | 'warning' | 'error' | 'success' autoDismiss?: number title: string message: string } interface AtmosphereEvents { addToast: Toast removeToast: (toast: string | any) => void endDraggingReflection: MasonryDragEndPayload meetingSidebarCollapsed: boolean newSubscriptionClient: void removeGitHubRepo: void } const store = new Store(new RecordSource())
<<<<<<< import { toggleWeb3Epic } from './toggleWeb3.epic'; ======= import { toggleWeb3AccountsEpic } from './toggleWeb3Accounts.epic'; import { tryToDownloadEpic } from './tryToDownload.epic'; >>>>>>> import { tryToDownloadEpic } from './tryToDownload.epic'; import { toggleWeb3Epic } from './toggleWeb3.epic'; <<<<<<< toggleWeb3Epic, ======= toggleWeb3AccountsEpic, tryToDownloadEpic >>>>>>> tryToDownloadEpic, toggleWeb3Epic,
<<<<<<< export * from './console.actions'; export * from './deployer.actions'; ======= export * from './console.actions'; export * from './modal.actions'; >>>>>>> export * from './console.actions'; export * from './deployer.actions'; export * from './modal.actions';
<<<<<<< export * from './simpleModal'; export * from './importFileModal'; ======= export * from './simpleModal'; export * from './projectTemplateModal'; >>>>>>> export * from './simpleModal'; export * from './importFileModal'; export * from './projectTemplateModal';
<<<<<<< export * from './logLevel.model'; export * from './dependencies.model'; ======= export * from './auth.model'; export * from './dependencies.model'; export * from './transaction.model'; >>>>>>> export * from './logLevel.model'; export * from './auth.model'; export * from './dependencies.model'; export * from './transaction.model';
<<<<<<< export * from './account-environment.model'; export * from './logLevel.model'; ======= export * from './account-environment.model'; export * from './dependencies.model'; >>>>>>> export * from './account-environment.model'; export * from './logLevel.model'; export * from './dependencies.model';
<<<<<<< version: '1.6.1', isEmbeddedMode: false, isEvmReady: false ======= version: '1.7.0', isEmbeddedMode: false >>>>>>> version: '1.7.0', isEmbeddedMode: false, isEvmReady: false
<<<<<<< if (!this.configurationProvider.openIDConfiguration.trigger_authorization_result_event && !isRenewProcess) { this.router.navigate([this.configurationProvider.openIDConfiguration.unauthorized_route]); ======= this.resetAuthorizationData(false); this.oidcSecurityCommon.authNonce = ''; if (!this.authConfiguration.trigger_authorization_result_event && !isRenewProcess) { this.router.navigate([this.authConfiguration.unauthorized_route]); >>>>>>> this.resetAuthorizationData(false); this.oidcSecurityCommon.authNonce = ''; if (!this.configurationProvider.openIDConfiguration.trigger_authorization_result_event && !isRenewProcess) { this.router.navigate([this.configurationProvider.openIDConfiguration.unauthorized_route]);
<<<<<<< if (!this.configurationProvider.openIDConfiguration.trigger_authorization_result_event && !isRenewProcess) { this.router.navigate([this.configurationProvider.openIDConfiguration.unauthorized_route]); ======= this.resetAuthorizationData(false); this.oidcSecurityCommon.authNonce = ''; if (!this.authConfiguration.trigger_authorization_result_event && !isRenewProcess) { this.router.navigate([this.authConfiguration.unauthorized_route]); >>>>>>> this.resetAuthorizationData(false); this.oidcSecurityCommon.authNonce = ''; if (!this.configurationProvider.openIDConfiguration.trigger_authorization_result_event && !isRenewProcess) { this.router.navigate([this.configurationProvider.openIDConfiguration.unauthorized_route]);
<<<<<<< export interface RawDelegatorDeposited { delegator: string; zrx_deposited: string; } export interface RawDelegatorStaked { delegator: string; zrx_staked_overall: string; pool_id: string; zrx_staked_in_pool: string; } export interface RawAllTimeDelegatorPoolsStats { pool_id: string; reward: string; } export interface PoolEpochDelegatorStats { poolId: string; zrxStaked: number; } export interface EpochDelegatorStats { zrxDeposited: number; zrxStaked: number; poolData: PoolEpochDelegatorStats[]; } export interface AllTimeDelegatorPoolStats { poolId: string; rewardsInEth: number; } export interface AllTimeDelegatorStats { poolData: AllTimeDelegatorPoolStats[]; } export interface StakingDelegatorResponse { delegatorAddress: string; forCurrentEpoch: EpochDelegatorStats; forNextEpoch: EpochDelegatorStats; allTime: AllTimeDelegatorStats; } ======= export interface StakingEpochsResponse { currentEpoch: Epoch; nextEpoch: Epoch; } export interface StakingStatsResponse { allTime: AllTimeStakingStats; } >>>>>>> export interface RawDelegatorDeposited { delegator: string; zrx_deposited: string; } export interface RawDelegatorStaked { delegator: string; zrx_staked_overall: string; pool_id: string; zrx_staked_in_pool: string; } export interface RawAllTimeDelegatorPoolsStats { pool_id: string; reward: string; } export interface PoolEpochDelegatorStats { poolId: string; zrxStaked: number; } export interface EpochDelegatorStats { zrxDeposited: number; zrxStaked: number; poolData: PoolEpochDelegatorStats[]; } export interface AllTimeDelegatorPoolStats { poolId: string; rewardsInEth: number; } export interface AllTimeDelegatorStats { poolData: AllTimeDelegatorPoolStats[]; } export interface StakingDelegatorResponse { delegatorAddress: string; forCurrentEpoch: EpochDelegatorStats; forNextEpoch: EpochDelegatorStats; allTime: AllTimeDelegatorStats; } export interface StakingEpochsResponse { currentEpoch: Epoch; nextEpoch: Epoch; } export interface StakingStatsResponse { allTime: AllTimeStakingStats; }
<<<<<<< import { SignedOrderModel } from '../models/SignedOrderModel'; import { meshUtils } from '../utils/mesh_utils'; import { orderUtils } from '../utils/order_utils'; import { paginationUtils } from '../utils/pagination_utils'; ======= import { MeshUtils } from '../mesh_utils'; import { paginate } from '../paginator'; import { compareAskOrder, compareBidOrder, deserializeOrder, deserializeOrderToAPIOrder, includesTokenAddress, signedOrderToAssetPair, } from './orderbook_utils'; >>>>>>> import { meshUtils } from '../utils/mesh_utils'; import { orderUtils } from '../utils/order_utils'; import { paginationUtils } from '../utils/pagination_utils'; <<<<<<< const deserializedOrder = orderUtils.deserializeOrderToAPIOrder(signedOrderModelIfExists as Required< SignedOrderModel ======= const deserializedOrder = deserializeOrderToAPIOrder(signedOrderModelIfExists as Required< SignedOrderEntity >>>>>>> const deserializedOrder = orderUtils.deserializeOrderToAPIOrder(signedOrderModelIfExists as Required< SignedOrderEntity <<<<<<< })) as Array<Required<SignedOrderModel>>; const bidApiOrders: APIOrder[] = bidSignedOrderModels .map(orderUtils.deserializeOrderToAPIOrder) .sort((orderA, orderB) => orderUtils.compareBidOrder(orderA.order, orderB.order)); const askApiOrders: APIOrder[] = askSignedOrderModels .map(orderUtils.deserializeOrderToAPIOrder) .sort((orderA, orderB) => orderUtils.compareAskOrder(orderA.order, orderB.order)); const paginatedBidApiOrders = paginationUtils.paginate(bidApiOrders, page, perPage); const paginatedAskApiOrders = paginationUtils.paginate(askApiOrders, page, perPage); ======= })) as Array<Required<SignedOrderEntity>>; const bidApiOrders: APIOrder[] = bidSignedOrderEntities .map(deserializeOrderToAPIOrder) .sort((orderA, orderB) => compareBidOrder(orderA.order, orderB.order)); const askApiOrders: APIOrder[] = askSignedOrderEntitys .map(deserializeOrderToAPIOrder) .sort((orderA, orderB) => compareAskOrder(orderA.order, orderB.order)); const paginatedBidApiOrders = paginate(bidApiOrders, page, perPage); const paginatedAskApiOrders = paginate(askApiOrders, page, perPage); >>>>>>> })) as Array<Required<SignedOrderEntity>>; const bidApiOrders: APIOrder[] = bidSignedOrderEntities .map(orderUtils.deserializeOrderToAPIOrder) .sort((orderA, orderB) => orderUtils.compareBidOrder(orderA.order, orderB.order)); const askApiOrders: APIOrder[] = askSignedOrderEntities .map(orderUtils.deserializeOrderToAPIOrder) .sort((orderA, orderB) => orderUtils.compareAskOrder(orderA.order, orderB.order)); const paginatedBidApiOrders = paginationUtils.paginate(bidApiOrders, page, perPage); const paginatedAskApiOrders = paginationUtils.paginate(askApiOrders, page, perPage);
<<<<<<< import { SubtaskPromptComponent } from './subtask-prompt/subtask-prompt.component'; import { TitleEditorComponent } from './title-editor/title-editor.component'; ======= import { KeySelectorComponent } from './key-selector/key-selector.component'; >>>>>>> import { SubtaskPromptComponent } from './subtask-prompt/subtask-prompt.component'; import { TitleEditorComponent } from './title-editor/title-editor.component'; import { KeySelectorComponent } from './key-selector/key-selector.component'; <<<<<<< declarations: [JiraDetailComponent, JiraRichTextComponent, TransitionControlComponent, AddCommentPromptComponent, ProfileSelectorComponent, ProfileFilterPipe, SubtaskPromptComponent, TitleEditorComponent] ======= declarations: [JiraDetailComponent, JiraRichTextComponent, TransitionControlComponent, AddCommentPromptComponent, ProfileSelectorComponent, ProfileFilterPipe, KeySelectorComponent] >>>>>>> declarations: [JiraDetailComponent, JiraRichTextComponent, TransitionControlComponent, AddCommentPromptComponent, ProfileSelectorComponent, ProfileFilterPipe, KeySelectorComponent, SubtaskPromptComponent, TitleEditorComponent]
<<<<<<< import { SubtaskPromptComponent } from '../subtask-prompt/subtask-prompt.component'; ======= import { KeySelectorComponent } from '../key-selector/key-selector.component'; >>>>>>> import { SubtaskPromptComponent } from '../subtask-prompt/subtask-prompt.component'; import { KeySelectorComponent } from '../key-selector/key-selector.component'; <<<<<<< addSubtask() { this.delayEnableLoading(); let elem = this.promptInj.injectComponent(SubtaskPromptComponent); elem.key = this.issue.key; elem.toCancel.subscribe(() => { this.loading = false; }); elem.toEnter.subscribe(name => { this.jira.addSubtask(this.currentIssueKey, name, this.issue.fields.project.id); }); } updateTitle() { this.loading = true; this.jira.updateIssue(this.issue.key, {summary: this.issue.fields.summary}, null); } private delayEnableLoading() { let that = this; setTimeout(() => { that.loading = true; }, 400); } ======= loadIssue(key) { this.loading = true; this.currentIssueKey = key; this.jira.getIssue(key); } >>>>>>> addSubtask() { this.delayEnableLoading(); let elem = this.promptInj.injectComponent(SubtaskPromptComponent); elem.key = this.issue.key; elem.toCancel.subscribe(() => { this.loading = false; }); elem.toEnter.subscribe(name => { this.jira.addSubtask(this.currentIssueKey, name, this.issue.fields.project.id); }); } updateTitle() { this.loading = true; this.jira.updateIssue(this.issue.key, {summary: this.issue.fields.summary}, null); } private delayEnableLoading() { let that = this; setTimeout(() => { that.loading = true; }, 400); } loadIssue(key) { this.loading = true; this.currentIssueKey = key; this.jira.getIssue(key); }
<<<<<<< import { Resolution } from '../models/resolution'; ======= import { IssueType } from '../models/issue-type'; import { Resolution } from '../models/resolution'; >>>>>>> import { IssueType } from '../models/issue-type'; import { Resolution } from '../models/resolution'; <<<<<<< resolutions = []; ======= private resolutions: Resolution[] = []; private issueTypes: IssueType[] = []; private subtaskType: IssueType; >>>>>>> resolutions: Resolution[] = []; private issueTypes: IssueType[] = []; private subtaskType: IssueType;
<<<<<<< ======= if (angular.isDefined(self.model.inputProcessor)) { var match = matchInputProcessor(self.model.inputProcessor, self.inputProcessors); if (angular.isDefined(match)) { self.inputProcessor = match; self.inputProcessorId = match.id; } } if (self.inputProcessorId == null && self.inputProcessors != null && self.inputProcessors.length > 0) { self.inputProcessorId = self.inputProcessors[0].id; } // Skip this step if it's empty if (self.inputProcessors.length === 0 && !_.some(self.nonInputProcessors, function (processor:any) { return processor.userEditable })) { var step = StepperService.getStep("DefineFeedStepper", parseInt(self.stepIndex)); if (step != null) { step.skip = true; } } // Find controller services _.chain(template.inputProcessors.concat(template.nonInputProcessors)) .pluck("properties") .flatten(true) .filter(function (property) { return angular.isObject(property.propertyDescriptor) && angular.isString(property.propertyDescriptor.identifiesControllerService); }) .each(findControllerServicesForProperty); self.loading = false; self.model.isStream = template.isStream; validate(); >>>>>>>
<<<<<<< resolveFn: resolveParams } ======= resolveFn: (state: StateService) => state.transition.params() }, resolveFeed >>>>>>> resolveFn: resolveParams }, resolveFeed <<<<<<< resolveFn: resolveParams } ======= resolveFn: (state: StateService) => state.transition.params() }, resolveFeed >>>>>>> resolveFn: resolveParams }, resolveFeed <<<<<<< resolveFn: resolveParams } ======= resolveFn: (state: StateService) => state.transition.params() }, resolveFeed >>>>>>> resolveFn: resolveParams }, resolveFeed <<<<<<< resolveFn: resolveParams } ======= resolveFn: (state: StateService) => state.transition.params() }, resolveFeed >>>>>>> resolveFn: resolveParams }, resolveFeed
<<<<<<< templateUrl: "./search.html" }); ======= templateUrl: "js/search/common/search.html" }); export default module; >>>>>>> templateUrl: "./search.html" }); export default module;
<<<<<<< import {SideNavService} from "../../../services/SideNavService"; ======= import SideNavService from "../../../services/SideNavService"; import {DatasetPreviewStepperDialogComponent, DatasetPreviewStepperDialogData} from "../../catalog-dataset-preview/preview-stepper/dataset-preview-stepper-dialog.component"; import {DatasetPreviewStepperSavedEvent} from "../../catalog-dataset-preview/preview-stepper/dataset-preview-stepper.component"; import {DatasetTable} from "../../catalog/api/models/dataset-table"; import {DataSource} from "../../catalog/api/models/datasource"; import {CatalogService} from "../../catalog/api/services/catalog.service"; import {TableColumn} from "../../catalog/datasource/preview-schema/model/table-view-model"; >>>>>>> import {SideNavService} from "../../../services/SideNavService"; import {DatasetPreviewStepperDialogComponent, DatasetPreviewStepperDialogData} from "../../catalog-dataset-preview/preview-stepper/dataset-preview-stepper-dialog.component"; import {DatasetPreviewStepperSavedEvent} from "../../catalog-dataset-preview/preview-stepper/dataset-preview-stepper.component"; import {DatasetTable} from "../../catalog/api/models/dataset-table"; import {DataSource} from "../../catalog/api/models/datasource"; import {CatalogService} from "../../catalog/api/services/catalog.service"; import {TableColumn} from "../../catalog/datasource/preview-schema/model/table-view-model"; <<<<<<< import {DatasetPreviewStepperDialogComponent, DatasetPreviewStepperDialogData} from "../../catalog-dataset-preview/preview-stepper/dataset-preview-stepper-dialog.component"; import {MatDialogConfig} from "@angular/material/dialog"; import {DatasetPreviewStepperSavedEvent} from "../../catalog-dataset-preview/preview-stepper/dataset-preview-stepper.component"; import {Subject} from "rxjs/Subject"; import {CatalogService} from "../../catalog/api/services/catalog.service"; import {DataSource} from "../../catalog/api/models/datasource"; import {DatasetTable} from "../../catalog/api/models/dataset-table"; import {TableColumn} from "../../catalog/datasource/preview-schema/model/table-view-model"; import {Common} from "../../../common/CommonTypes"; import {HttpClient} from "@angular/common/http"; ======= >>>>>>> <<<<<<< public filteredTables: any = []; ======= public filteredTables: DatasourcesServiceStatic.TableReference[] =[]; >>>>>>> public filteredTables: DatasourcesServiceStatic.TableReference[] =[]; <<<<<<< catchError( () => { this.databaseConnectionError = true; return null; }), ======= catchError( () => { this.databaseConnectionError = true return Observable.of([]) }), >>>>>>> catchError( () => { this.databaseConnectionError = true return Observable.of([]) }), <<<<<<< )).subscribe(results => { this.filteredTables = results; if (searchTerm && searchTerm != "" && this.filteredTables.length == 0){ ======= )).subscribe((results:DatasourcesServiceStatic.TableReference[]) => { this.filteredTables = results if(searchTerm && searchTerm != "" && this.filteredTables.length == 0){ >>>>>>> )).subscribe((results:DatasourcesServiceStatic.TableReference[]) => { this.filteredTables = results if(searchTerm && searchTerm != "" && this.filteredTables.length == 0){ <<<<<<< this.http.get("/api/v1/ui/wrangler/table-auto-complete-enabled", {responseType: 'text'}).subscribe(enabled => { this.showDatasources = enabled === "true"; ======= this.http.get("/api/v1/ui/wrangler/table-auto-complete-enabled", {responseType: 'text'}).subscribe((enabled:string|boolean) => { this.showDatasources = enabled == true || enabled == "true"; >>>>>>> this.http.get("/api/v1/ui/wrangler/table-auto-complete-enabled", {responseType: 'text'}).subscribe((enabled:string|boolean) => { this.showDatasources = enabled == true || enabled == "true";
<<<<<<< import { IInstanceDiscoveryMetadata } from "../authority/IInstanceDiscoveryMetadata"; ======= import { CacheManager, DefaultStorageClass } from "../cache/CacheManager"; >>>>>>> import { IInstanceDiscoveryMetadata } from "../authority/IInstanceDiscoveryMetadata"; import { CacheManager, DefaultStorageClass } from "../cache/CacheManager";
<<<<<<< dataSource = new MatTableDataSource(); length = undefined; ======= >>>>>>> dataSource = new MatTableDataSource(); length = undefined;
<<<<<<< ======= this.columns = this.getColumns(); this.sortBy = this.getSortByColumnName(); if(this.path == undefined || this.path == ""){ //attempt to get it from the selection service this.path = this.selectionService.getLastPath(this.datasource.id) || "" } >>>>>>> if(this.path == undefined || this.path == ""){ //attempt to get it from the selection service this.path = this.selectionService.getLastPath(this.datasource.id) || "" } <<<<<<< this.init(); } /** * To be implemented by subclasses, e.g. load data from server. * This method is called during standard lifecycle ngOnInit method. */ init(): void { } /** * Needs to be explicitly called by subclasses to load data from server, e.g. during init() method. */ initData(): void { const thisNode = this.node; this.http.get(this.getUrl(), {params: this.params}) ======= const node = this.node; this.http.get(this.getUrl() + encodeURIComponent(this.path), {}) >>>>>>> this.init(); } /** * To be implemented by subclasses, e.g. load data from server. * This method is called during standard lifecycle ngOnInit method. */ init(): void { } /** * Needs to be explicitly called by subclasses to load data from server, e.g. during init() method. */ initData(): void { const thisNode = this.node; this.http.get(this.getUrl(), {params: this.params}) <<<<<<< ======= this.filter(); //mark the last selected path for this datasource.id in the selection service this.selectionService.setLastPath(this.datasource.id,this.path) >>>>>>> //mark the last selected path for this datasource.id in the selection service this.selectionService.setLastPath(this.datasource.id,this.path)
<<<<<<< import {FeedLoadingService} from './feeds/define-feed-ng2/services/feed-loading-service'; import {DefineFeedService} from './feeds/define-feed-ng2/services/define-feed.service'; import {FeedAccessControlService} from './feeds/define-feed-ng2/services/feed-access-control.service'; ======= import {SlaService} from "./services/sla.service"; >>>>>>> import {SlaService} from "./services/sla.service"; import {FeedLoadingService} from './feeds/define-feed-ng2/services/feed-loading-service'; import {DefineFeedService} from './feeds/define-feed-ng2/services/define-feed.service'; import {FeedAccessControlService} from './feeds/define-feed-ng2/services/feed-access-control.service';
<<<<<<< import {MatButtonToggleModule} from "@angular/material/button-toggle"; ======= import {CatalogDatasetPreviewModule} from "../../catalog-dataset-preview/catalog-dataset-preview.module"; >>>>>>> import {MatButtonToggleModule} from "@angular/material/button-toggle"; import {CatalogDatasetPreviewModule} from "../../catalog-dataset-preview/catalog-dataset-preview.module";
<<<<<<< import { AccessTokenEntity } from "./entities/AccessTokenEntity"; import { ScopeSet } from "../request/ScopeSet"; ======= import { IdTokenEntity } from "./entities/IdTokenEntity"; import { AccessTokenEntity } from "./entities/AccessTokenEntity"; import { RefreshTokenEntity } from "./entities/RefreshTokenEntity"; >>>>>>> import { IdTokenEntity } from "./entities/IdTokenEntity"; import { AccessTokenEntity } from "./entities/AccessTokenEntity"; import { RefreshTokenEntity } from "./entities/RefreshTokenEntity"; import { ScopeSet } from "../request/ScopeSet"; <<<<<<< if (CacheHelper.getCredentialType(cacheKey) === Constants.NOT_DEFINED) { ======= const credType = CacheHelper.getCredentialType(cacheKey); if ( credType === Constants.NOT_DEFINED ) { >>>>>>> const credType = CacheHelper.getCredentialType(cacheKey); if (credType === Constants.NOT_DEFINED) { <<<<<<< if (!StringUtils.isEmpty(target) && CacheHelper.getCredentialType(cacheKey) !== CredentialType.ID_TOKEN) { matches = matches && CacheHelper.matchTarget(entity, target, clientId); ======= if ( !StringUtils.isEmpty(target) && credType === CredentialType.ACCESS_TOKEN ) { matches = matches && CacheHelper.matchTarget(entity, target); >>>>>>> // TODO: Add case for target specific refresh tokens if (!StringUtils.isEmpty(target) && credType === CredentialType.ACCESS_TOKEN) { matches = matches && CacheHelper.matchTarget(entity, target, clientId);
<<<<<<< request: any // tslint:disable-next-line:no-any [index: string]: any ======= [index: string]: any, initEditorContent?: string >>>>>>> request: any // tslint:disable-next-line:no-any [index: string]: any initEditorContent?: string <<<<<<< trace = async (topicId: number, identifyId: number, // tslint:disable-next-line:align traceOrNot: boolean, isAnonymous: boolean = false) => { if (traceOrNot) { if (!isAnonymous) { this.put(state => { state.from = 0, state.request = async () => await GET<IPost[]>('post/topic/user', { params: { topicId: `${topicId}`, userId: `${identifyId}`, from: `${this.state.from}`, size: '10', }, }), state.userMap = {}, state.posts = [] }) } else { this.put(state => { state.from = 0, state.request = async () => await GET<IPost[]>('post/topic/anonymous/user', { params: { topicId: `${topicId}`, postId: `${identifyId}`, from: `${this.state.from}`, size: '10', }, }), state.userMap = {}, state.posts = [] }) } } else { this.put(state => { state.from = 0, state.request = async () => await GET<IPost[]>(`topic/${this.state.topicId}/post`, { params: { from: `${this.state.from}`, size: '10', }, }), state.userMap = {}, state.posts = [] }) } this.fetchPosts() } ======= resetInitContent = () => { this.put(state => { state.initEditorContent = undefined }) } >>>>>>> trace = async (topicId: number, identifyId: number, // tslint:disable-next-line:align traceOrNot: boolean, isAnonymous: boolean = false) => { if (traceOrNot) { if (!isAnonymous) { this.put(state => { state.from = 0, state.request = async () => await GET<IPost[]>('post/topic/user', { params: { topicId: `${topicId}`, userId: `${identifyId}`, from: `${this.state.from}`, size: '10', }, }), state.userMap = {}, state.posts = [] }) } else { this.put(state => { state.from = 0, state.request = async () => await GET<IPost[]>('post/topic/anonymous/user', { params: { topicId: `${topicId}`, postId: `${identifyId}`, from: `${this.state.from}`, size: '10', }, }), state.userMap = {}, state.posts = [] }) } } else { this.put(state => { state.from = 0, state.request = async () => await GET<IPost[]>(`topic/${this.state.topicId}/post`, { params: { from: `${this.state.from}`, size: '10', }, }), state.userMap = {}, state.posts = [] }) } this.fetchPosts() } resetInitContent = () => { this.put(state => { state.initEditorContent = undefined }) }
<<<<<<< ID_TOKEN = "IdToken", ACCESS_TOKEN = "AccessToken", REFRESH_TOKEN = "RefreshToken", APP_METADATA = "AppMetadata", TEMPORARY = "TempCache", UNDEFINED = "Undefined" ======= APP_META_DATA = "AppMetadata", TEMPORARY = "TempCache", TELEMETRY = "Telemetry", >>>>>>> ID_TOKEN = "IdToken", ACCESS_TOKEN = "AccessToken", REFRESH_TOKEN = "RefreshToken", APP_METADATA = "AppMetadata", TEMPORARY = "TempCache", TELEMETRY = "Telemetry", UNDEFINED = "Undefined" <<<<<<< export const APP_METADATA = "appmetadata"; export const ClientInfo = "client_info"; ======= export const APP_META_DATA = "appmetadata"; export const ClientInfo = "client_info"; export const SERVER_TELEM_CONSTANTS = { SCHEMA_VERSION: 2, FAILURE_LIMIT: 3, CACHE_KEY: "server-telemetry", CATEGORY_SEPARATOR: "|", VALUE_SEPARATOR: "," }; >>>>>>> export const APP_METADATA = "appmetadata"; export const ClientInfo = "client_info"; export const SERVER_TELEM_CONSTANTS = { SCHEMA_VERSION: 2, FAILURE_LIMIT: 3, CACHE_KEY: "server-telemetry", CATEGORY_SEPARATOR: "|", VALUE_SEPARATOR: "," };
<<<<<<< import { resolveThemeAddress, acceptThemeCLI } from './themes' import { updateTrayIcon, updateTrayMenu } from './tray' ======= import { acceptThemeCLI } from './themes' >>>>>>> import { resolveThemeAddress, acceptThemeCLI } from './themes' import { updateTrayIcon, updateTrayMenu } from './tray' import { acceptThemeCLI } from './themes'
<<<<<<< import { USER_TOKENS, USERS } from '../ChatUsers'; function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; } ======= >>>>>>> function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; } <<<<<<< const loginUser = async (config: LoginConfig) => { const client = new StreamChat< LocalAttachmentType, LocalChannelType, LocalCommandType, LocalEventType, LocalMessageType, LocalResponseType, LocalUserType >(config.apiKey, { timeout: 6000, }); const randomSeed = getRandomInt(1, 50); const user = { id: config.userId, image: config.userImage || `https://randomuser.me/api/portraits/thumb/men/${randomSeed}.jpg`, name: config.userName, }; await client.connectUser(user, config.userToken); await AsyncStore.setItem('@stream-rn-sampleapp-login-config', config); setChatClient(client); }; ======= >>>>>>> const loginUser = async (config: LoginConfig) => { const client = new StreamChat< LocalAttachmentType, LocalChannelType, LocalCommandType, LocalEventType, LocalMessageType, LocalResponseType, LocalUserType >(config.apiKey, { timeout: 6000, }); const randomSeed = getRandomInt(1, 50); const user = { id: config.userId, image: config.userImage || `https://randomuser.me/api/portraits/thumb/men/${randomSeed}.jpg`, name: config.userName, }; await client.connectUser(user, config.userToken); await AsyncStore.setItem('@stream-rn-sampleapp-login-config', config); setChatClient(client); }; <<<<<<< const id = userId; ======= const id = userId || (await AsyncStore.getItem<string>( '@stream-rn-sampleapp-user-id', null, )); >>>>>>> const id = userId; <<<<<<< await loginUser({ apiKey: 'q95x9hkbyd6p', userId: USERS[id].id, userImage: USERS[id].image, userName: USERS[id].name || '', userToken: USER_TOKENS[id], ======= const user = USERS[id]; const userToken = USER_TOKENS[id]; const client = new StreamChat< LocalAttachmentType, LocalChannelType, LocalCommandType, LocalEventType, LocalMessageType, LocalResponseType, LocalUserType >('q95x9hkbyd6p', { logger: (_type, _msg, extra) => { if ((extra?.tags as string[])?.indexOf('api_response') > -1) { // console.log(msg, extra); } }, timeout: 6000, >>>>>>> await loginUser({ apiKey: 'q95x9hkbyd6p', userId: USERS[id].id, userImage: USERS[id].image, userName: USERS[id].name || '', userToken: USER_TOKENS[id],
<<<<<<< import BigNumber from "big.js" ======= import fetch from "isomorphic-fetch" >>>>>>> import BigNumber from "big.js" import fetch from "isomorphic-fetch"
<<<<<<< import { Observable, Subject, Subscription } from 'rxjs'; import { ComponentLoaderFactory } from '../component-loader/component-loader.factory'; import { ComponentLoader } from '../component-loader/component-loader.class'; ======= import { Subscription } from 'rxjs'; import { ComponentLoaderFactory, ComponentLoader } from 'ngx-bootstrap/component-loader'; >>>>>>> import { Observable, Subject, Subscription } from 'rxjs'; import { ComponentLoaderFactory, ComponentLoader } from 'ngx-bootstrap/component-loader';
<<<<<<< /// <reference path="../tsd.d.ts" /> import {Component, View, bootstrap, NgClass} from 'angular2/angular2'; import {Ng2BootstrapConfig, Ng2BootstrapTheme} from '../components/index'; let w:any = window; if (w && w.__theme === 'bs4') { Ng2BootstrapConfig.theme = Ng2BootstrapTheme.BS4; } import {AccordionSection} from './components/accordion-section'; import {AlertSection} from './components/alert-section'; import {ButtonsSection} from './components/buttons-section'; import {CarouselSection} from './components/carousel-section'; import {CollapseSection} from './components/collapse-section'; import {DropdownSection} from './components/dropdown-section'; import {PaginationSection} from './components/pagination-section'; import {ProgressbarSection} from './components/progressbar-section'; import {RatingSection} from './components/rating-section'; import {TabsSection} from './components/tabs-section'; import {TimepickerSection} from './components/timepicker-section'; import {TooltipSection} from './components/tooltip-section'; import {DemoHeader} from './components/demo-header'; let gettingStarted = require('./getting-started.md'); @Component({ selector: 'app' }) @View({ template: ` <demo-header>Loading header</demo-header> <main class="bd-pageheader"> <div class="container"> <h1>ng2-bootstrap</h1> <p>Native Angular2 directives for Bootstrap</p> <a class="btn btn-primary" href="https://github.com/valor-software/ng2-bootstrap">View on GitHub</a> <div class="row"> <div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-bootstrap&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div> <div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-bootstrap&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div> </div> </div> </main> <div class="container"> <div class="col-md-12 card card-block panel panel-default"> <selection> <h1>ng2-bootstrap available with: <a class="btn btn-default btn-secondary btn-lg" [ng-class]="{active: isBs3}" href="./">Bootstrap 3</a> <a class="btn btn-default btn-secondary btn-lg" [ng-class]="{active: !isBs3}" href="./index-bs4.html">Bootstrap 4</a> </h1> </selection> </div> <br> <section id="getting-started">${gettingStarted}</section> <accordion-section class="col-md-12"></accordion-section> <alert-section class="col-md-12"></alert-section> <buttons-section class="col-md-12"></buttons-section> <carousel-section class="col-md-12"></carousel-section> <collapse-section class="col-md-12"></collapse-section> <dropdown-section class="col-md-12"></dropdown-section> <pagination-section class="col-md-12"></pagination-section> <progressbar-section class="col-md-12"></progressbar-section> <rating-section class="col-md-12"></rating-section> <tabs-section class="col-md-12"></tabs-section> <timepicker-section class="col-md-12"></timepicker-section> <tooltip-section class="col-md-12"></tooltip-section> </div> </div> <footer class="footer"> <div class="container"> <p class="text-muted text-center"><a href="https://github.com/valor-software/ng2-bootstrap">ng2-bootstrap</a> is maintained by <a href="https://github.com/valor-software">valor-software</a>.</p> </div> </footer> `, directives: [ NgClass, DemoHeader, AccordionSection, AlertSection, ButtonsSection, CarouselSection, CollapseSection, DropdownSection, PaginationSection, ProgressbarSection, RatingSection, TabsSection, TimepickerSection, TooltipSection ] }) export class Demo { private isBs3:boolean = Ng2BootstrapConfig.theme === Ng2BootstrapTheme.BS3; } bootstrap(Demo); ======= /// <reference path="../tsd.d.ts" /> import {Component, View, bootstrap} from 'angular2/angular2'; import {AccordionDemo} from './components/accordion-demo'; import {AlertDemo} from './components/alert-demo'; import {ButtonsDemo} from './components/buttons-demo'; import {DatePickerDemo} from './components/datepicker-demo'; import {DropdownDemo} from './components/dropdown-demo'; import {CarouselDemo} from './components/carousel-demo'; import {CollapseDemo} from './components/collapse-demo'; import {PaginationDemo} from './components/pagination-demo'; import {ProgressbarDemo} from './components/progressbar-demo'; import {RatingDemo} from './components/rating-demo'; import {TabsDemo} from './components/tabs-demo'; import {TimepickerDemo} from './components/timepicker-demo'; import {TooltipDemo} from './components/tooltip-demo'; @Component({ selector: 'app' }) @View({ template: ` <div></div> <accordion-demo class="col-md-12"></accordion-demo> <alert-demo class="col-md-12"></alert-demo> <buttons-demo class="col-md-12"></buttons-demo> <carousel-demo class="col-md-12"></carousel-demo> <datepicker-demo class="col-md-12"></datepicker-demo> <dropdown-demo class="col-md-12"></dropdown-demo> <collapse-demo class="col-md-12"></collapse-demo> <pagination-demo class="col-md-12"></pagination-demo> <progressbar-demo class="col-md-12"></progressbar-demo> <rating-demo class="col-md-12"></rating-demo> <tabs-demo class="col-md-12"></tabs-demo> <timepicker-demo class="col-md-12"></timepicker-demo> <tooltip-demo class="col-md-12"></tooltip-demo> `, directives: [ AlertDemo, AccordionDemo, ButtonsDemo, DatePickerDemo, DropdownDemo, CarouselDemo, CollapseDemo, PaginationDemo, ProgressbarDemo, RatingDemo, TabsDemo, TimepickerDemo, TooltipDemo ] }) export class Home { } bootstrap(Home); // "demo/index.ts", // "demo/typings/es6-object.d.ts", // "demo/components/accordion-demo.ts", // "demo/components/alert-demo.ts", // "demo/components/buttons-demo.ts", // "demo/components/dropdown-demo.ts", // "demo/components/collapse-demo.ts", // "demo/components/pagination-demo.ts", // "demo/components/progressbar-demo.ts", // "demo/components/rating-demo.ts", // "demo/components/tabs-demo.ts", // "demo/components/timepicker-demo.ts", // "demo/components/tooltip-demo.ts" >>>>>>> /// <reference path="../tsd.d.ts" /> import {Component, View, bootstrap, NgClass} from 'angular2/angular2'; import {Ng2BootstrapConfig, Ng2BootstrapTheme} from '../components/index'; let w:any = window; if (w && w.__theme === 'bs4') { Ng2BootstrapConfig.theme = Ng2BootstrapTheme.BS4; } import {DatePickerDemo} from './components/datepicker-demo'; import {AccordionSection} from './components/accordion-section'; import {AlertSection} from './components/alert-section'; import {ButtonsSection} from './components/buttons-section'; import {CarouselSection} from './components/carousel-section'; import {CollapseSection} from './components/collapse-section'; import {DropdownSection} from './components/dropdown-section'; import {PaginationSection} from './components/pagination-section'; import {ProgressbarSection} from './components/progressbar-section'; import {RatingSection} from './components/rating-section'; import {TabsSection} from './components/tabs-section'; import {TimepickerSection} from './components/timepicker-section'; import {TooltipSection} from './components/tooltip-section'; import {DemoHeader} from './components/demo-header'; let gettingStarted = require('./getting-started.md'); @Component({ selector: 'app' }) @View({ template: ` <demo-header>Loading header</demo-header> <main class="bd-pageheader"> <div class="container"> <h1>ng2-bootstrap</h1> <p>Native Angular2 directives for Bootstrap</p> <a class="btn btn-primary" href="https://github.com/valor-software/ng2-bootstrap">View on GitHub</a> <div class="row"> <div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-bootstrap&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div> <div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-bootstrap&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div> </div> </div> </main> <div class="container"> <div class="col-md-12 card card-block panel panel-default"> <selection> <h1>ng2-bootstrap available with: <a class="btn btn-default btn-secondary btn-lg" [ng-class]="{active: isBs3}" href="./">Bootstrap 3</a> <a class="btn btn-default btn-secondary btn-lg" [ng-class]="{active: !isBs3}" href="./index-bs4.html">Bootstrap 4</a> </h1> </selection> </div> <br> <section id="getting-started">${gettingStarted}</section> <accordion-section class="col-md-12"></accordion-section> <alert-section class="col-md-12"></alert-section> <buttons-section class="col-md-12"></buttons-section> <carousel-section class="col-md-12"></carousel-section> <collapse-section class="col-md-12"></collapse-section> <datepicker-demo class="col-md-12"></datepicker-demo> <dropdown-section class="col-md-12"></dropdown-section> <pagination-section class="col-md-12"></pagination-section> <progressbar-section class="col-md-12"></progressbar-section> <rating-section class="col-md-12"></rating-section> <tabs-section class="col-md-12"></tabs-section> <timepicker-section class="col-md-12"></timepicker-section> <tooltip-section class="col-md-12"></tooltip-section> </div> </div> <footer class="footer"> <div class="container"> <p class="text-muted text-center"><a href="https://github.com/valor-software/ng2-bootstrap">ng2-bootstrap</a> is maintained by <a href="https://github.com/valor-software">valor-software</a>.</p> </div> </footer> `, directives: [ NgClass, DemoHeader, AccordionSection, AlertSection, ButtonsSection, CarouselSection, CollapseSection, DatePickerDemo, DropdownSection, PaginationSection, ProgressbarSection, RatingSection, TabsSection, TimepickerSection, TooltipSection ] }) export class Demo { private isBs3:boolean = Ng2BootstrapConfig.theme === Ng2BootstrapTheme.BS3; } bootstrap(Demo);
<<<<<<< /** provides possibility to set keyNavigations enable or disable, by default is enable */ isKeysAllowed = true; ======= /** aria label for tab list */ ariaLabel = 'Tabs'; >>>>>>> /** provides possibility to set keyNavigations enable or disable, by default is enable */ isKeysAllowed = true; /** aria label for tab list */ ariaLabel = 'Tabs';
<<<<<<< import { TestBed, ComponentFixture, tick, fakeAsync } from '@angular/core/testing'; import { asNativeElements, EventEmitter } from '@angular/core'; ======= /* tslint:disable: max-file-line-count */ import { asNativeElements } from '@angular/core'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; >>>>>>> /* tslint:disable: max-file-line-count */ import { TestBed, ComponentFixture, tick, fakeAsync } from '@angular/core/testing'; import { asNativeElements, EventEmitter } from '@angular/core'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; <<<<<<< component.parent = { } as TypeaheadDirective; component.parent.typeaheadOnPreview = new EventEmitter<TypeaheadMatch>(); ======= /* tslint:disable-next-line: no-object-literal-type-assertion */ component.parent = { typeaheadSelectFirstItem: false, typeaheadIsFirstItemActive: true } as TypeaheadDirective; >>>>>>> /* tslint:disable-next-line: no-object-literal-type-assertion */ component.parent = { typeaheadSelectFirstItem: false, typeaheadIsFirstItemActive: true } as TypeaheadDirective; component.parent.typeaheadOnPreview = new EventEmitter<TypeaheadMatch>(); <<<<<<< component.parent = { typeaheadOptionsInScrollableView: 3, typeaheadScrollable: true } as TypeaheadDirective; component.parent.typeaheadOnPreview = new EventEmitter<TypeaheadMatch>(); ======= /* tslint:disable-next-line: no-object-literal-type-assertion */ component.parent = { typeaheadOptionsInScrollableView: 3, typeaheadScrollable: true, typeaheadIsFirstItemActive: true } as TypeaheadDirective; >>>>>>> /* tslint:disable-next-line: no-object-literal-type-assertion */ component.parent = { typeaheadOptionsInScrollableView: 3, typeaheadScrollable: true, typeaheadIsFirstItemActive: true } as TypeaheadDirective; component.parent.typeaheadOnPreview = new EventEmitter<TypeaheadMatch>();
<<<<<<< .to('body') .show({ content, isAnimated: this.config.animated, initialState: this.config.initialState, bsModalService: this, id: this.config.id }); modalContainerRef.instance.level = this.getModalsCount(); ======= .to('body'); >>>>>>> .to('body'); <<<<<<< bsModalRef.id = modalContainerRef.instance.config.id; bsModalRef.content = modalLoader.getInnerComponent() || null; ======= >>>>>>>
<<<<<<< .map((_val: string): Date => parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale)) ======= .map((_val: string): Date => { if (this._picker._config.useUtc) { return utcAsLocal( parseDate(_val, this._picker._config.dateInputFormat, this._localeService.currentLocale) ); } return parseDate(_val, this._picker._config.dateInputFormat, this._localeService.currentLocale); } ) >>>>>>> .map((_val: string): Date => { if (this._picker._config.useUtc) { return utcAsLocal( parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale) ); } return parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale); } )
<<<<<<< import { Injectable } from '@angular/core'; import { ClassName, CloseInterceptorFn, DismissReasons, Selector, TransitionDurations } from './models'; ======= import { Injectable, StaticProvider, InjectionToken } from '@angular/core'; import { ClassName, DismissReasons, Selector, TransitionDurations } from './models'; >>>>>>> import { Injectable, StaticProvider, InjectionToken } from '@angular/core'; import { ClassName, CloseInterceptorFn, DismissReasons, Selector, TransitionDurations } from './models'; <<<<<<< initialState?: Object; /** * Function to intercept the closure */ closeInterceptor?: CloseInterceptorFn; ======= initialState?: Partial<T>; /** * Modal providers */ providers?: StaticProvider[]; /** * aria-labelledby attribute value to set on the modal window */ ariaLabelledBy?: string; /** * aria-describedby attribute value to set on the modal window */ ariaDescribedby?: string; >>>>>>> initialState?: Partial<T>; /** * Function to intercept the closure */ closeInterceptor?: CloseInterceptorFn; /** * Modal providers */ providers?: StaticProvider[]; /** * aria-labelledby attribute value to set on the modal window */ ariaLabelledBy?: string; /** * aria-describedby attribute value to set on the modal window */ ariaDescribedby?: string;
<<<<<<< import { DemoDatePickerTooltipToSelectedDates } from './demos/tooltip-to-selected-dates/tooltip-to-selected-dates'; ======= import { DemoDateRangePickerMaxDateRangeComponent } from './demos/max-date-range/max-date-range'; import { DemoDateRangePickerDisplayOneMonth } from './demos/daterangepicker-display-one-month/display-one-month'; import { DemoDatepickerTodayButtonComponent } from './demos/today-button/today-button'; >>>>>>> import { DemoDatePickerTooltipToSelectedDates } from './demos/tooltip-to-selected-dates/tooltip-to-selected-dates'; import { DemoDateRangePickerMaxDateRangeComponent } from './demos/max-date-range/max-date-range'; import { DemoDateRangePickerDisplayOneMonth } from './demos/daterangepicker-display-one-month/display-one-month'; import { DemoDatepickerTodayButtonComponent } from './demos/today-button/today-button';
<<<<<<< outlet: DemoDatepickerTodayButtonComponent }, { title: 'Show Clear Button', anchor: 'datepicker-show-clear-button', component: require('!!raw-loader!./demos/clear-button/clear-button.ts'), html: require('!!raw-loader!./demos/clear-button/clear-button.html'), description: `<p>Display an optional 'Clear' button that will automatically clear date.</p>`, outlet: DemoDatepickerClearButtonComponent ======= outlet: DemoDatepickerTodayButtonComponent, }, { title: 'Max Date Range in Daterangepicker', anchor: 'daterangepicker-max-date-range', component: require('!!raw-loader!./demos/max-date-range/max-date-range.ts'), html: require('!!raw-loader!./demos/max-date-range/max-date-range.html'), description: `<p>Max date range after first date selection can be added to Daterangepicker using <code>maxDateRange</code></p>`, outlet: DemoDateRangePickerMaxDateRangeComponent >>>>>>> outlet: DemoDatepickerTodayButtonComponent, }, { title: 'Show Clear Button', anchor: 'datepicker-show-clear-button', component: require('!!raw-loader!./demos/clear-button/clear-button.ts'), html: require('!!raw-loader!./demos/clear-button/clear-button.html'), description: `<p>Display an optional 'Clear' button that will automatically clear date.</p>`, outlet: DemoDatepickerClearButtonComponent }, { title: 'Max Date Range in Daterangepicker', anchor: 'daterangepicker-max-date-range', component: require('!!raw-loader!./demos/max-date-range/max-date-range.ts'), html: require('!!raw-loader!./demos/max-date-range/max-date-range.html'), description: `<p>Max date range after first date selection can be added to Daterangepicker using <code>maxDateRange</code></p>`, outlet: DemoDateRangePickerMaxDateRangeComponent
<<<<<<< import { BasePlugin, PluginInfo } from 'lisk-framework'; import { RawBlock, RawBlockHeader } from '@liskhq/lisk-chain'; import { codec } from '@liskhq/lisk-codec'; import { hash } from '@liskhq/lisk-cryptography'; ======= import { RawBlock, RawBlockHeader } from '@liskhq/lisk-chain'; import { codec } from '@liskhq/lisk-codec'; import { hash } from '@liskhq/lisk-cryptography'; >>>>>>> import { RawBlock, RawBlockHeader } from '@liskhq/lisk-chain'; import { codec } from '@liskhq/lisk-codec'; import { hash } from '@liskhq/lisk-cryptography'; <<<<<<< this._app.get('/api/stats/forks', controllers.forks.getForkStats(this._state)); ======= this._app.get( '/api/stats/blocks', controllers.blocks.getBlockStats(this._channel, this._state), ); this._app.get('/api/stats/network', controllers.network.getNetworkStats(this._channel)); >>>>>>> this._app.get( '/api/stats/blocks', controllers.blocks.getBlockStats(this._channel, this._state), ); this._app.get('/api/stats/network', controllers.network.getNetworkStats(this._channel)); this._app.get('/api/stats/forks', controllers.forks.getForkStats(this._state)); <<<<<<< private _handleFork(block: string) { const { header } = codec.decode<RawBlock>(this.schemas.block, Buffer.from(block, 'hex')); const decodedHeader = codec.decode<RawBlockHeader>(this.schemas.blockHeader, header); const blockId = hash(header).toString('hex'); this._state.forks.forkEventCount += 1; this._state.forks.blockHeaders[blockId] = { blockHeader: decodedHeader, timeReceived: Date.now(), }; } ======= private _handlePostBlock(data: EventPostBlockData) { const blockBytes = Buffer.from(data.block, 'hex'); const decodedBlock = codec.decode<RawBlock>(this.schemas.block, blockBytes); const decodedBlockHeader = codec.decode<RawBlockHeader>( this.schemas.blockHeader, decodedBlock.header, ); const blockId = hash(decodedBlock.header); if (!this._state.blocks.blocks[blockId.toString('hex')]) { this._state.blocks.blocks[blockId.toString('hex')] = { count: 0, height: decodedBlockHeader.height, }; } this._state.blocks.blocks[blockId.toString('hex')].count += 1; // Clean up blocks older than current height minus 300 blocks for (const id of Object.keys(this._state.blocks.blocks)) { const blockInfo = this._state.blocks.blocks[id]; if (blockInfo.height < decodedBlockHeader.height - 300) { delete this._state.blocks.blocks[id]; } } } >>>>>>> private _handleFork(block: string) { const { header } = codec.decode<RawBlock>(this.schemas.block, Buffer.from(block, 'hex')); const decodedHeader = codec.decode<RawBlockHeader>(this.schemas.blockHeader, header); const blockId = hash(header).toString('hex'); this._state.forks.forkEventCount += 1; this._state.forks.blockHeaders[blockId] = { blockHeader: decodedHeader, timeReceived: Date.now(), }; } private _handlePostBlock(data: EventPostBlockData) { const blockBytes = Buffer.from(data.block, 'hex'); const decodedBlock = codec.decode<RawBlock>(this.schemas.block, blockBytes); const decodedBlockHeader = codec.decode<RawBlockHeader>( this.schemas.blockHeader, decodedBlock.header, ); const blockId = hash(decodedBlock.header); if (!this._state.blocks.blocks[blockId.toString('hex')]) { this._state.blocks.blocks[blockId.toString('hex')] = { count: 0, height: decodedBlockHeader.height, }; } this._state.blocks.blocks[blockId.toString('hex')].count += 1; // Clean up blocks older than current height minus 300 blocks for (const id of Object.keys(this._state.blocks.blocks)) { const blockInfo = this._state.blocks.blocks[id]; if (blockInfo.height < decodedBlockHeader.height - 300) { delete this._state.blocks.blocks[id]; } } }
<<<<<<< // Max rate of WebSocket messages per second per peer. export const DEFAULT_WS_MAX_MESSAGE_RATE = 100; export const DEFAULT_RATE_CALCULATION_INTERVAL = 1000; ======= export const DEFAULT_WS_MAX_PAYLOAD = 1048576; // Payload in bytes >>>>>>> // Max rate of WebSocket messages per second per peer. export const DEFAULT_WS_MAX_MESSAGE_RATE = 100; export const DEFAULT_RATE_CALCULATION_INTERVAL = 1000; export const DEFAULT_WS_MAX_PAYLOAD = 1048576; // Payload in bytes
<<<<<<< verifyAmountBalance, verifyBalance, verifyMultiSignatureTransaction, ======= verifyMinRemainingBalance, verifyMultiSignatures, >>>>>>> verifyMinRemainingBalance, verifyMultiSignatureTransaction, <<<<<<< verifyBalance, verifyMultiSignatureTransaction, ======= verifyMultiSignatures, >>>>>>> verifyMultiSignatureTransaction,
<<<<<<< import { validator } from '../utils'; ======= import { CreateBaseTransactionInput, validator } from '../utils'; import { isTypedObjectArrayWithKeys } from '../utils/validation'; >>>>>>> import { CreateBaseTransactionInput, validator } from '../utils'; <<<<<<< public static create(input: RegisterDelegateInput): object { validateInput(input); const { username, passphrase, secondPassphrase } = input; if (!username || typeof username !== 'string') { throw new Error('Please provide a username. Expected string.'); } if (username.length > USERNAME_MAX_LENGTH) { throw new Error( `Username length does not match requirements. Expected to be no more than ${USERNAME_MAX_LENGTH} characters.`, ); } const transaction = { ...createBaseTransaction(input), type: 2, fee: DELEGATE_FEE.toString(), asset: { delegate: { username } }, }; if (!passphrase) { return transaction; } const delegateTransaction = new DelegateTransaction( transaction as TransactionJSON, ); delegateTransaction.sign(passphrase, secondPassphrase); return delegateTransaction.toJSON(); } public static fromJSON(tx: TransactionJSON): DelegateTransaction { const transaction = new DelegateTransaction(tx); const { errors, status } = transaction.validate(); if (status === Status.FAIL && errors.length !== 0) { throw new TransactionMultiError( 'Failed to validate schema', tx.id, errors, ); } return transaction; } ======= >>>>>>>
<<<<<<< undoSteps = [jest.fn(), jest.fn()]; blockProcessorV1.forkStatus.pipe(forkSteps); blockProcessorV1.validate.pipe(validateSteps); blockProcessorV1.verify.pipe(verifySteps); blockProcessorV1.apply.pipe(applySteps); blockProcessorV1.undo.pipe(undoSteps); processor.register(blockProcessorV1, { ======= blockProcessorV0.forkStatus.pipe(forkSteps); blockProcessorV0.validate.pipe(validateSteps); blockProcessorV0.verify.pipe(verifySteps); blockProcessorV0.apply.pipe(applySteps); processor.register(blockProcessorV0, { >>>>>>> blockProcessorV1.forkStatus.pipe(forkSteps); blockProcessorV1.validate.pipe(validateSteps); blockProcessorV1.verify.pipe(verifySteps); blockProcessorV1.apply.pipe(applySteps); processor.register(blockProcessorV1, { <<<<<<< undoSteps = [jest.fn(), jest.fn()]; blockProcessorV1.undo.pipe(undoSteps); processor.register(blockProcessorV1, { ======= processor.register(blockProcessorV0, { >>>>>>> processor.register(blockProcessorV1, {
<<<<<<< import { discoverPeers } from './peer_discovery'; import { getUniquePeersbyIp } from './peer_selection'; ======= >>>>>>> import { getUniquePeersbyIp } from './peer_selection'; <<<<<<< maxPeerListSize: MAX_PEER_LIST_BATCH_SIZE, ======= wsMaxMessageRate: this._peerPoolConfig.wsMaxMessageRate, wsMaxMessageRatePenalty: this._peerPoolConfig.wsMaxMessageRatePenalty, rateCalculationInterval: this._peerPoolConfig.rateCalculationInterval, >>>>>>> maxPeerListSize: MAX_PEER_LIST_BATCH_SIZE, wsMaxMessageRate: this._peerPoolConfig.wsMaxMessageRate, wsMaxMessageRatePenalty: this._peerPoolConfig.wsMaxMessageRatePenalty, rateCalculationInterval: this._peerPoolConfig.rateCalculationInterval, <<<<<<< peer.connect(); return peer; } public addDiscoveredPeer( detailedPeerInfo: P2PDiscoveredPeerInfo, inboundSocket?: SCServerSocket, ): Peer { const peerConfig = { connectTimeout: this._peerPoolConfig.connectTimeout, ackTimeout: this._peerPoolConfig.ackTimeout, maxPeerListSize: MAX_PEER_LIST_BATCH_SIZE, }; const peer = new Peer(detailedPeerInfo, peerConfig, { inbound: inboundSocket, }); this._peerMap.set(peer.id, peer); this._bindHandlersToPeer(peer); if (this._nodeInfo) { this._applyNodeInfoOnPeer(peer, this._nodeInfo); } peer.connect(); ======= >>>>>>> peer.connect(); <<<<<<< public getUniqueConnectedPeers(): ReadonlyArray<P2PDiscoveredPeerInfo> { return getUniquePeersbyIp(this.getAllConnectedPeerInfos()); } public getAllPeerInfos(): ReadonlyArray<P2PDiscoveredPeerInfo> { return this.getAllPeers().map(peer => peer.peerInfo); ======= public getAllConnectedPeerInfos(): ReadonlyArray<P2PDiscoveredPeerInfo> { return this.getConnectedPeers().map( peer => peer.peerInfo as P2PDiscoveredPeerInfo, ); >>>>>>> public getUniqueConnectedPeers(): ReadonlyArray<P2PDiscoveredPeerInfo> { return getUniquePeersbyIp(this.getAllConnectedPeerInfos()); } public getAllConnectedPeerInfos(): ReadonlyArray<P2PDiscoveredPeerInfo> { return this.getConnectedPeers().map( peer => peer.peerInfo as P2PDiscoveredPeerInfo, );
<<<<<<< import { Status, TransactionJSON } from '../transaction_types'; import { prependMinusToPublicKeys, prependPlusToPublicKeys } from '../utils'; ======= import { Account, Status, TransactionJSON } from '../transaction_types'; import { CreateBaseTransactionInput } from '../utils'; >>>>>>> import { TransactionJSON } from '../transaction_types'; import { CreateBaseTransactionInput } from '../utils'; <<<<<<< createBaseTransaction, CreateBaseTransactionInput, StateStore, StateStorePrepare, ======= ENTITY_ACCOUNT, EntityMap, RequiredState, TransactionResponse, >>>>>>> StateStore, StateStorePrepare <<<<<<< public static create(input: CastVoteInput): object { validateInputs(input); const { passphrase, secondPassphrase, votes = [], unvotes = [] } = input; const plusPrependedVotes = prependPlusToPublicKeys(votes); const minusPrependedUnvotes = prependMinusToPublicKeys(unvotes); const allVotes: ReadonlyArray<string> = [ ...plusPrependedVotes, ...minusPrependedUnvotes, ]; const transaction = { ...createBaseTransaction(input), type: 3, fee: VOTE_FEE.toString(), asset: { votes: allVotes, }, }; if (!passphrase) { return transaction; } const transactionWithSenderInfo = { ...transaction, // SenderId and SenderPublicKey are expected to be exist from base transaction senderId: transaction.senderId as string, senderPublicKey: transaction.senderPublicKey as string, recipientId: transaction.senderId as string, recipientPublicKey: transaction.senderPublicKey, }; const voteTransaction = new VoteTransaction(transactionWithSenderInfo); voteTransaction.sign(passphrase, secondPassphrase); return voteTransaction.toJSON(); } public static fromJSON(tx: TransactionJSON): VoteTransaction { const transaction = new VoteTransaction(tx); const { errors, status } = transaction.validate(); if (status === Status.FAIL && errors.length !== 0) { throw new TransactionMultiError( 'Failed to validate schema.', tx.id, errors, ); } return transaction; } ======= >>>>>>>
<<<<<<< // Remove these wsPort and ip from the query object const { wsPort, ip, advertiseAddress, ...restOfQueryObject } = queryObject; ======= // Remove these wsPort and ipAddress from the query object const { wsPort, ipAddress, ...restOfQueryObject } = queryObject; >>>>>>> // Remove these wsPort and ipAddress from the query object const { wsPort, ipAddress, advertiseAddress, ...restOfQueryObject } = queryObject; <<<<<<< const selectedPeers = shuffle(knownPeers) .slice(0, randomPeerCount) .filter( peer => !(peer.internalState && !peer.internalState.advertiseAddress), ) .map( sanitizeOutgoingPeerInfo, // Sanitize the peerInfos before responding to a peer that understand old peerInfo. ); ======= // Remove internal state to check byte size const sanitizedPeerInfoList: ProtocolPeerInfo[] = selectedPeers.map( peer => ({ ipAddress: peer.ipAddress, wsPort: peer.wsPort, ...peer.sharedState, }), ); >>>>>>> // Remove internal state to check byte size const sanitizedPeerInfoList: ProtocolPeerInfo[] = selectedPeers .filter( peer => !(peer.internalState && !peer.internalState.advertiseAddress), ) .map(peer => ({ ipAddress: peer.ipAddress, wsPort: peer.wsPort, ...peer.sharedState, })); <<<<<<< peers: selectedPeers, }; request.end(peerInfoList); ======= peers: getByteSize(sanitizedPeerInfoList) < wsMaxPayload ? sanitizedPeerInfoList : sanitizedPeerInfoList.slice(0, safeMaxPeerInfoLength), }); >>>>>>> peers: getByteSize(sanitizedPeerInfoList) < wsMaxPayload ? sanitizedPeerInfoList : sanitizedPeerInfoList.slice(0, safeMaxPeerInfoLength), });
<<<<<<< import { InboundPeer } from '../../src/peer'; ======= import { SCServerSocket } from 'socketcluster-server'; import * as url from 'url'; import cloneDeep = require('lodash.clonedeep'); >>>>>>> import { InboundPeer } from '../../src/peer'; import { SCServerSocket } from 'socketcluster-server'; import * as url from 'url'; import cloneDeep = require('lodash.clonedeep');
<<<<<<< import { Forger, ForgerInfo, Options, TransactionFees } from './types'; import { DB_KEY_FORGER_INFO } from './constants'; import { forgerInfoSchema } from './schema'; import { Web } from './hooks'; ======= import { Forger, Options, TransactionFees } from './types'; const BLOCKS_BATCH_TO_SYNC = 1000; >>>>>>> import { Forger, Options, TransactionFees } from './types'; import { Web } from './hooks'; const BLOCKS_BATCH_TO_SYNC = 1000; <<<<<<< // eslint-disable-next-line new-cap const { locale } = Intl.DateTimeFormat().resolvedOptions(); this._webhooks = new Web( { 'User-Agent': `lisk-framework-forger-plugin/0.1.0 (${os.platform()} ${os.release()}; ${os.arch()} ${locale}.${ process.env.LC_CTYPE ?? '' }) lisk-framework/${options.version}`, }, options.webhook, ); this._forgerPluginDB = await this._getDBInstance(options); ======= this._forgerPluginDB = await getDBInstance(options.dataPath); >>>>>>> // eslint-disable-next-line new-cap const { locale } = Intl.DateTimeFormat().resolvedOptions(); this._webhooks = new Web( { 'User-Agent': `lisk-framework-forger-plugin/0.1.0 (${os.platform()} ${os.release()}; ${os.arch()} ${locale}.${ process.env.LC_CTYPE ?? '' }) lisk-framework/${options.version}`, }, options.webhook, ); this._forgerPluginDB = await getDBInstance(options.dataPath); <<<<<<< // eslint-disable-next-line no-void void this._webhooks.handleEvent({ event: 'forging:node:start', time: new Date(), payload: { reason: 'Node started' }, }); this._registerMiddlewares(options); this._registerControllers(); this._registerAfterMiddlewares(options); ======= this._app = initApi(options, this._channel, this.codec); // Fetch and set forger list from the app >>>>>>> this._app = initApi(options, this._channel, this.codec); // eslint-disable-next-line no-void void this._webhooks.handleEvent({ event: 'forging:node:start', time: new Date(), payload: { reason: 'Node started' }, }); // Fetch and set forger list from the app <<<<<<< const forgerInfo = await this._getForgerInfo(forgerAddressBinary); ======= const forgerInfo = await getForgerInfo(this._forgerPluginDB, forgerAddressBinary); >>>>>>> const forgerInfo = await getForgerInfo(this._forgerPluginDB, forgerAddressBinary); <<<<<<< await this._setForgerInfo(missedForgerAddress, missedForger); // eslint-disable-next-line no-void void this._webhooks.handleEvent({ event: 'forger:block:missed', time: new Date(), payload: { missedForgerAddress, height }, }); ======= await setForgerInfo(this._forgerPluginDB, missedForgerAddress, missedForger); >>>>>>> await setForgerInfo(this._forgerPluginDB, missedForgerAddress, missedForger); // eslint-disable-next-line no-void void this._webhooks.handleEvent({ event: 'forger:block:missed', time: new Date(), payload: { missedForgerAddress, height }, });
<<<<<<< export const DEFAULT_POPULATOR_INTERVAL = 10000; ======= export const DEFAULT_SEND_PEER_LIMIT = 25; >>>>>>> export const DEFAULT_POPULATOR_INTERVAL = 10000; export const DEFAULT_SEND_PEER_LIMIT = 25; <<<<<<< await this._startDiscovery(seedPeerInfos); this._startPopulator(); ======= await this._startDiscovery(); >>>>>>> await this._startDiscovery(); this._startPopulator();
<<<<<<< P2PPeersCount, P2PPeerSelectionForConnection, P2PPeerSelectionForRequest, P2PPeerSelectionForSend, ======= P2PPeerSelectionForConnectionFunction, P2PPeerSelectionForRequestFunction, P2PPeerSelectionForSendFunction, >>>>>>> P2PPeersCount, P2PPeerSelectionForConnectionFunction, P2PPeerSelectionForRequestFunction, P2PPeerSelectionForSendFunction, <<<<<<< private readonly _peerSelectForSend: P2PPeerSelectionForSend; private readonly _peerSelectForRequest: P2PPeerSelectionForRequest; private readonly _peerSelectForConnection: P2PPeerSelectionForConnection; private readonly _maxOutboundConnections: number; ======= private readonly _peerSelectForSend: P2PPeerSelectionForSendFunction; private readonly _peerSelectForRequest: P2PPeerSelectionForRequestFunction; private readonly _peerSelectForConnection: P2PPeerSelectionForConnectionFunction; private readonly _sendPeerLimit: number; >>>>>>> private readonly _maxOutboundConnections: number; private readonly _peerSelectForSend: P2PPeerSelectionForSendFunction; private readonly _peerSelectForRequest: P2PPeerSelectionForRequestFunction; private readonly _peerSelectForConnection: P2PPeerSelectionForConnectionFunction; private readonly _sendPeerLimit: number; <<<<<<< this._maxOutboundConnections = peerPoolConfig.maxOutboundConnections; ======= this._sendPeerLimit = peerPoolConfig.sendPeerLimit; >>>>>>> this._maxOutboundConnections = peerPoolConfig.maxOutboundConnections; this._sendPeerLimit = peerPoolConfig.sendPeerLimit; <<<<<<< ): void { const peersCount = this.getPeersCountByKind(); // Trigger new connections only if the maximum of outbound connections has not been reached if (peersCount.outbound < this._maxOutboundConnections) { // Try to connect to as many peers as possible without surpassing the maximum const shuffledPeers = shuffle(peers).slice( 0, this._maxOutboundConnections - peersCount.outbound, ); const peersToConnect = this._peerSelectForConnection(shuffledPeers); peersToConnect.forEach((peerInfo: P2PDiscoveredPeerInfo) => { const peerId = constructPeerIdFromPeerInfo(peerInfo); ======= ): ReadonlyArray<P2PDiscoveredPeerInfo> { const peersToConnect = this._peerSelectForConnection({ peers }); peersToConnect.forEach((peerInfo: P2PDiscoveredPeerInfo) => { const peerId = constructPeerIdFromPeerInfo(peerInfo); return this.addOutboundPeer(peerId, peerInfo); }); >>>>>>> ): void { const peersCount = this.getPeersCountByKind(); // Trigger new connections only if the maximum of outbound connections has not been reached if (peersCount.outbound < this._maxOutboundConnections) { // Try to connect to as many peers as possible without surpassing the maximum const shuffledPeers = shuffle(peers).slice( 0, this._maxOutboundConnections - peersCount.outbound, ); const peersToConnect = this._peerSelectForConnection({ peers: shuffledPeers, }); peersToConnect.forEach((peerInfo: P2PDiscoveredPeerInfo) => { const peerId = constructPeerIdFromPeerInfo(peerInfo);
<<<<<<< DEFAULT_BAN_TIME, DEFAULT_MAX_INBOUND_CONNECTIONS, DEFAULT_MAX_OUTBOUND_CONNECTIONS, DEFAULT_MAX_PEER_DISCOVERY_RESPONSE_LENGTH, DEFAULT_MAX_PEER_INFO_SIZE, DEFAULT_MIN_PEER_DISCOVERY_THRESHOLD, DEFAULT_NODE_HOST_IP, DEFAULT_OUTBOUND_SHUFFLE_INTERVAL, DEFAULT_PEER_PROTECTION_FOR_LATENCY, DEFAULT_PEER_PROTECTION_FOR_LONGEVITY, DEFAULT_PEER_PROTECTION_FOR_NETGROUP, DEFAULT_PEER_PROTECTION_FOR_USEFULNESS, DEFAULT_POPULATOR_INTERVAL, DEFAULT_RANDOM_SECRET, DEFAULT_RATE_CALCULATION_INTERVAL, DEFAULT_SEND_PEER_LIMIT, DEFAULT_WS_MAX_MESSAGE_RATE, DEFAULT_WS_MAX_MESSAGE_RATE_PENALTY, DEFAULT_WS_MAX_PAYLOAD, ======= DUPLICATE_CONNECTION, DUPLICATE_CONNECTION_REASON, >>>>>>> DEFAULT_BAN_TIME, DEFAULT_MAX_INBOUND_CONNECTIONS, DEFAULT_MAX_OUTBOUND_CONNECTIONS, DEFAULT_MAX_PEER_DISCOVERY_RESPONSE_LENGTH, DEFAULT_MAX_PEER_INFO_SIZE, DEFAULT_MIN_PEER_DISCOVERY_THRESHOLD, DEFAULT_NODE_HOST_IP, DEFAULT_OUTBOUND_SHUFFLE_INTERVAL, DEFAULT_PEER_PROTECTION_FOR_LATENCY, DEFAULT_PEER_PROTECTION_FOR_LONGEVITY, DEFAULT_PEER_PROTECTION_FOR_NETGROUP, DEFAULT_PEER_PROTECTION_FOR_USEFULNESS, DEFAULT_POPULATOR_INTERVAL, DEFAULT_RANDOM_SECRET, DEFAULT_RATE_CALCULATION_INTERVAL, DEFAULT_SEND_PEER_LIMIT, DEFAULT_WS_MAX_MESSAGE_RATE, DEFAULT_WS_MAX_MESSAGE_RATE_PENALTY, DEFAULT_WS_MAX_PAYLOAD, DUPLICATE_CONNECTION, DUPLICATE_CONNECTION_REASON,
<<<<<<< createBaseTransaction, StateStore, StateStorePrepare, ======= ENTITY_ACCOUNT, EntityMap, TransactionResponse, >>>>>>> StateStore, StateStorePrepare, <<<<<<< public static create(input: TransferInput): object { validateInputs(input); const { amount, recipientId: recipientIdInput, recipientPublicKey, data, passphrase, secondPassphrase, } = input; const recipientIdFromPublicKey = recipientPublicKey ? getAddressFromPublicKey(recipientPublicKey) : undefined; const recipientId = recipientIdInput ? recipientIdInput : recipientIdFromPublicKey; const transaction = { ...createBaseTransaction(input), type: 0, amount, recipientId, recipientPublicKey, fee: TRANSFER_FEE.toString(), asset: data ? { data } : {}, }; if (!passphrase) { return transaction; } const transactionWithSenderInfo = { ...transaction, // SenderId and SenderPublicKey are expected to be exist from base transaction recipientId: recipientId as string, senderId: transaction.senderId as string, senderPublicKey: transaction.senderPublicKey as string, }; const transferTransaction = new TransferTransaction( transactionWithSenderInfo, ); transferTransaction.sign(passphrase, secondPassphrase); return transferTransaction.toJSON(); } public static fromJSON(tx: TransactionJSON): TransferTransaction { const transaction = new TransferTransaction(tx); const { errors, status } = transaction.validate(); if (status === Status.FAIL && errors.length !== 0) { throw new TransactionMultiError( 'Failed to validate schema', tx.id, errors, ); } return transaction; } ======= >>>>>>>
<<<<<<< readonly totalAmount: string; ======= readonly totalAmount: bigint; readonly epochTime: string; >>>>>>> readonly totalAmount: bigint;
<<<<<<< this._handleBanPeer = (peerId: string) => { this._bannedPeers.add(peerId.split(':')[0]); if (this._triedPeers.has(peerId)) { this._triedPeers.delete(peerId); } if (this._newPeers.has(peerId)) { this._newPeers.delete(peerId); } // Re-emit the message to allow it to bubble up the class hierarchy. this.emit(EVENT_BAN_PEER, peerId); }; this._handleUnbanPeer = (peerId: string) => { this._bannedPeers.delete(peerId.split(':')[0]); // Re-emit the message to allow it to bubble up the class hierarchy. this.emit(EVENT_UNBAN_PEER, peerId); }; ======= // When peer is fetched for status after connection then update the peerinfo in triedPeer list >>>>>>> this._handleBanPeer = (peerId: string) => { this._bannedPeers.add(peerId.split(':')[0]); if (this._triedPeers.has(peerId)) { this._triedPeers.delete(peerId); } if (this._newPeers.has(peerId)) { this._newPeers.delete(peerId); } // Re-emit the message to allow it to bubble up the class hierarchy. this.emit(EVENT_BAN_PEER, peerId); }; this._handleUnbanPeer = (peerId: string) => { this._bannedPeers.delete(peerId.split(':')[0]); // Re-emit the message to allow it to bubble up the class hierarchy. this.emit(EVENT_UNBAN_PEER, peerId); }; // When peer is fetched for status after connection then update the peerinfo in triedPeer list
<<<<<<< P2PPeerSelectionForConnection, P2PPeerSelectionForRequest, P2PPeerSelectionForSend, P2PPenalty, ======= P2PPeerSelectionForConnectionFunction, P2PPeerSelectionForRequestFunction, P2PPeerSelectionForSendFunction, >>>>>>> P2PPeerSelectionForConnectionFunction, P2PPeerSelectionForRequestFunction, P2PPeerSelectionForSendFunction, P2PPenalty, <<<<<<< readonly peerSelectionForSend: P2PPeerSelectionForSend; readonly peerSelectionForRequest: P2PPeerSelectionForRequest; readonly peerSelectionForConnection: P2PPeerSelectionForConnection; readonly peerBanTime?: number; ======= readonly peerSelectionForSend: P2PPeerSelectionForSendFunction; readonly peerSelectionForRequest: P2PPeerSelectionForRequestFunction; readonly peerSelectionForConnection: P2PPeerSelectionForConnectionFunction; readonly sendPeerLimit: number; >>>>>>> readonly peerSelectionForSend: P2PPeerSelectionForSendFunction; readonly peerSelectionForRequest: P2PPeerSelectionForRequestFunction; readonly peerSelectionForConnection: P2PPeerSelectionForConnectionFunction; readonly sendPeerLimit: number; readonly peerBanTime?: number; <<<<<<< public selectPeersForRequest( requestPacket?: P2PRequestPacket, numOfPeers?: number, ): ReadonlyArray<P2PDiscoveredPeerInfo> { const listOfPeerInfo = [...this._peerMap.values()].map( (peer: Peer) => peer.peerInfo, ); const selectedPeers = this._peerSelectForRequest( listOfPeerInfo, this._nodeInfo, numOfPeers, requestPacket, ); return selectedPeers; } public selectPeersForSend( messagePacket?: P2PMessagePacket, numOfPeers?: number, ): ReadonlyArray<P2PDiscoveredPeerInfo> { const listOfPeerInfo = [...this._peerMap.values()].map( (peer: Peer) => peer.peerInfo, ); const selectedPeers = this._peerSelectForSend( listOfPeerInfo, this._nodeInfo, numOfPeers, messagePacket, ); return selectedPeers; } public async request(packet: P2PRequestPacket): Promise<P2PResponsePacket> { const selectedPeer = this.selectPeersForRequest(packet, 1); ======= public async requestFromPeer( packet: P2PRequestPacket, ): Promise<P2PResponsePacket> { const listOfPeerInfo = [...this._peerMap.values()].map( (peer: Peer) => peer.peerInfo, ); const selectedPeers = this._peerSelectForRequest({ peers: listOfPeerInfo, nodeInfo: this._nodeInfo, peerLimit: 1, requestPacket: packet, }); >>>>>>> public async request( packet: P2PRequestPacket, ): Promise<P2PResponsePacket> { const listOfPeerInfo = [...this._peerMap.values()].map( (peer: Peer) => peer.peerInfo, ); const selectedPeers = this._peerSelectForRequest({ peers: listOfPeerInfo, nodeInfo: this._nodeInfo, peerLimit: 1, requestPacket: packet, });
<<<<<<< peer.connect(); return peer; } public addDiscoveredPeer( detailedPeerInfo: P2PDiscoveredPeerInfo, inboundSocket?: SCServerSocket, ): Peer { const peerConfig = { connectTimeout: this._peerPoolConfig.connectTimeout, ackTimeout: this._peerPoolConfig.ackTimeout, banTime: this._peerPoolConfig.peerBanTime, }; const peer = new Peer(detailedPeerInfo, peerConfig, { inbound: inboundSocket, }); this._peerMap.set(peer.id, peer); this._bindHandlersToPeer(peer); if (this._nodeInfo) { this._applyNodeInfoOnPeer(peer, this._nodeInfo); } peer.updatePeerInfo(detailedPeerInfo); peer.connect(); ======= >>>>>>> <<<<<<< public applyPenalty(peerPenalty: P2PPenalty): void { const peer = this._peerMap.get(peerPenalty.peerId); if (peer) { peer.applyPenalty(peerPenalty.penalty); return; } throw new Error('Peer not found'); } private _removePeerIfFullyDisconnected(peerId: string): void { const peer = this.getPeer(peerId); if ( peer && peer.state.inbound === ConnectionState.CLOSED && peer.state.outbound === ConnectionState.CLOSED ) { this.removePeer(peerId); } } ======= >>>>>>> public applyPenalty(peerPenalty: P2PPenalty): void { const peer = this._peerMap.get(peerPenalty.peerId); if (peer) { peer.applyPenalty(peerPenalty.penalty); return; } throw new Error('Peer not found'); }
<<<<<<< describe('Fully connected network with a custom maximum payload', () => { const dataLargerThanMaxPayload = [ { ip: '100.100.100.100', os: 'linux4.18.0-20-generic', version: '2.0.0-rc.0', wsPort: 7001, httpPort: 7000, protocolVersion: '1.1', height: 8691420, broadhash: '65b4ad0583d0222db11619ec86bd4ba154e0bf8bfd72a4b9ad38dbc26da65249', nonce: 'V2IrG8mpOGx6LDuE', state: 2, }, { ip: '100.100.100.100', os: 'linux4.15.0-54-generic', version: '2.0.0-rc.0', wsPort: 7001, httpPort: 7000, protocolVersion: '1.1', height: 8691420, broadhash: '65b4ad0583d0222db11619ec86bd4ba154e0bf8bfd72a4b9ad38dbc26da65249', nonce: 'rbEj3J36NblYDEyd', state: 2, }, ]; beforeEach(async () => { p2pNodeList = [...new Array(NETWORK_PEER_COUNT).keys()].map(index => { // Each node will have the previous node in the sequence as a seed peer except the first node. const seedPeers = [ { ipAddress: '127.0.0.1', wsPort: NETWORK_START_PORT + ((index + 1) % NETWORK_PEER_COUNT), }, ]; const nodePort = NETWORK_START_PORT + index; return new P2P({ blacklistedPeers: [], connectTimeout: 5000, ackTimeout: 5000, seedPeers, populatorInterval: POPULATOR_INTERVAL, maxOutboundConnections: DEFAULT_MAX_INBOUND_CONNECTIONS, maxInboundConnections: DEFAULT_MAX_OUTBOUND_CONNECTIONS, wsEngine: 'ws', nodeInfo: { wsPort: nodePort, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba', version: '1.0.1', protocolVersion: '1.1', minVersion: '1.0.0', os: platform(), height: 0, broadhash: '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5', nonce: `O2wTkjqplHII${nodePort}`, }, wsMaxPayload: 500, }); }); await Promise.all(p2pNodeList.map(async p2p => await p2p.start())); await wait(100); }); afterEach(async () => { await Promise.all( p2pNodeList .filter(p2p => p2p.isActive) .map(async p2p => await p2p.stop()), ); await wait(100); }); describe('P2P.send', () => { let collectedMessages: Array<any> = []; beforeEach(() => { collectedMessages = []; p2pNodeList.forEach(p2p => { p2p.on('messageReceived', message => { collectedMessages.push({ nodePort: p2p.nodeInfo.wsPort, message, }); }); }); }); it('should not send a package larger than the ws max payload', async () => { const firstP2PNode = p2pNodeList[0]; firstP2PNode.send({ event: 'maxPayload', data: dataLargerThanMaxPayload, }); await wait(100); expect(collectedMessages).to.be.empty; }); it('should disconnect the peer which has sent the message', async () => { const firstP2PNode = p2pNodeList[0]; firstP2PNode.send({ event: 'maxPayload', data: dataLargerThanMaxPayload, }); await wait(100); for (const p2pNode of p2pNodeList) { if (p2pNode.nodeInfo.wsPort === 5000) { expect(p2pNode.getNetworkStatus().connectedPeers).to.be.empty; } else { expect(p2pNode.getNetworkStatus().connectedPeers).to.be.not.empty; } } }); }); }); ======= describe('Peer selection response to fetch peers RPC', () => { const MINIMUM_PEER_DISCOVERY_THRESHOLD = 1; const MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE = 3; describe(`When minimum peer discovery threshold is set to ${MINIMUM_PEER_DISCOVERY_THRESHOLD}`, () => { beforeEach(async () => { p2pNodeList = [...new Array(NETWORK_PEER_COUNT).keys()].map(index => { // Each node will have the previous node in the sequence as a seed peer except the first node. const seedPeers = index === 0 ? [] : [ { ipAddress: '127.0.0.1', wsPort: NETWORK_START_PORT + index - 1, }, ]; const nodePort = NETWORK_START_PORT + index; return new P2P({ connectTimeout: 10000, ackTimeout: 200, seedPeers, wsEngine: 'ws', populatorInterval: 10000, maxOutboundConnections: DEFAULT_MAX_OUTBOUND_CONNECTIONS, maxInboundConnections: DEFAULT_MAX_INBOUND_CONNECTIONS, minimumPeerDiscoveryThreshold: MINIMUM_PEER_DISCOVERY_THRESHOLD, nodeInfo: { wsPort: nodePort, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba', version: '1.0.1', protocolVersion: '1.1', minVersion: '1.0.0', os: platform(), height: 0, broadhash: '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5', nonce: `O2wTkjqplHII${nodePort}`, }, }); }); // Launch nodes one at a time with a delay between each launch. for (const p2p of p2pNodeList) { await p2p.start(); } await wait(200); }); afterEach(async () => { await Promise.all( p2pNodeList .filter(p2p => p2p.isActive) .map(async p2p => await p2p.stop()), ); await wait(100); }); it('should return list of peers with at most the minimum discovery threshold', async () => { const firstP2PNode = p2pNodeList[0]; const { newPeers } = firstP2PNode.getNetworkStatus(); expect(newPeers.length).to.be.at.most(MINIMUM_PEER_DISCOVERY_THRESHOLD); }); }); describe(`When maximum peer discovery response size is set to ${MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE}`, () => { beforeEach(async () => { p2pNodeList = [...new Array(NETWORK_PEER_COUNT).keys()].map(index => { // Each node will have the previous node in the sequence as a seed peer except the first node. const seedPeers = index === 0 ? [] : [ { ipAddress: '127.0.0.1', wsPort: NETWORK_START_PORT + index - 1, }, ]; const nodePort = NETWORK_START_PORT + index; return new P2P({ connectTimeout: 10000, ackTimeout: 200, seedPeers, wsEngine: 'ws', populatorInterval: 10000, maxOutboundConnections: DEFAULT_MAX_OUTBOUND_CONNECTIONS, maxInboundConnections: DEFAULT_MAX_INBOUND_CONNECTIONS, maximumPeerDiscoveryResponseSize: MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE, nodeInfo: { wsPort: nodePort, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba', version: '1.0.1', protocolVersion: '1.1', minVersion: '1.0.0', os: platform(), height: 0, broadhash: '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5', nonce: `O2wTkjqplHII${nodePort}`, }, }); }); // Launch nodes one at a time with a delay between each launch. for (const p2p of p2pNodeList) { await p2p.start(); } await wait(200); }); afterEach(async () => { await Promise.all( p2pNodeList .filter(p2p => p2p.isActive) .map(async p2p => await p2p.stop()), ); await wait(100); }); it('should return list of peers with less than maximum discovery response size', async () => { const firstP2PNode = p2pNodeList[0]; const { newPeers } = firstP2PNode.getNetworkStatus(); expect(newPeers.length).to.be.lessThan( MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE, ); }); }); }); >>>>>>> describe('Fully connected network with a custom maximum payload', () => { const dataLargerThanMaxPayload = [ { ip: '100.100.100.100', os: 'linux4.18.0-20-generic', version: '2.0.0-rc.0', wsPort: 7001, httpPort: 7000, protocolVersion: '1.1', height: 8691420, broadhash: '65b4ad0583d0222db11619ec86bd4ba154e0bf8bfd72a4b9ad38dbc26da65249', nonce: 'V2IrG8mpOGx6LDuE', state: 2, }, { ip: '100.100.100.100', os: 'linux4.15.0-54-generic', version: '2.0.0-rc.0', wsPort: 7001, httpPort: 7000, protocolVersion: '1.1', height: 8691420, broadhash: '65b4ad0583d0222db11619ec86bd4ba154e0bf8bfd72a4b9ad38dbc26da65249', nonce: 'rbEj3J36NblYDEyd', state: 2, }, ]; beforeEach(async () => { p2pNodeList = [...new Array(NETWORK_PEER_COUNT).keys()].map(index => { // Each node will have the previous node in the sequence as a seed peer except the first node. const seedPeers = [ { ipAddress: '127.0.0.1', wsPort: NETWORK_START_PORT + ((index + 1) % NETWORK_PEER_COUNT), }, ]; const nodePort = NETWORK_START_PORT + index; return new P2P({ blacklistedPeers: [], connectTimeout: 5000, ackTimeout: 5000, seedPeers, populatorInterval: POPULATOR_INTERVAL, maxOutboundConnections: DEFAULT_MAX_INBOUND_CONNECTIONS, maxInboundConnections: DEFAULT_MAX_OUTBOUND_CONNECTIONS, wsEngine: 'ws', nodeInfo: { wsPort: nodePort, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba', version: '1.0.1', protocolVersion: '1.1', minVersion: '1.0.0', os: platform(), height: 0, broadhash: '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5', nonce: `O2wTkjqplHII${nodePort}`, }, wsMaxPayload: 500, }); }); await Promise.all(p2pNodeList.map(async p2p => await p2p.start())); await wait(100); }); afterEach(async () => { await Promise.all( p2pNodeList .filter(p2p => p2p.isActive) .map(async p2p => await p2p.stop()), ); await wait(100); }); describe('P2P.send', () => { let collectedMessages: Array<any> = []; beforeEach(() => { collectedMessages = []; p2pNodeList.forEach(p2p => { p2p.on('messageReceived', message => { collectedMessages.push({ nodePort: p2p.nodeInfo.wsPort, message, }); }); }); }); it('should not send a package larger than the ws max payload', async () => { const firstP2PNode = p2pNodeList[0]; firstP2PNode.send({ event: 'maxPayload', data: dataLargerThanMaxPayload, }); await wait(100); expect(collectedMessages).to.be.empty; }); it('should disconnect the peer which has sent the message', async () => { const firstP2PNode = p2pNodeList[0]; firstP2PNode.send({ event: 'maxPayload', data: dataLargerThanMaxPayload, }); await wait(100); for (const p2pNode of p2pNodeList) { if (p2pNode.nodeInfo.wsPort === 5000) { expect(p2pNode.getNetworkStatus().connectedPeers).to.be.empty; } else { expect(p2pNode.getNetworkStatus().connectedPeers).to.be.not.empty; } } }); }); }); describe('Peer selection response to fetch peers RPC', () => { const MINIMUM_PEER_DISCOVERY_THRESHOLD = 1; const MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE = 3; describe(`When minimum peer discovery threshold is set to ${MINIMUM_PEER_DISCOVERY_THRESHOLD}`, () => { beforeEach(async () => { p2pNodeList = [...new Array(NETWORK_PEER_COUNT).keys()].map(index => { // Each node will have the previous node in the sequence as a seed peer except the first node. const seedPeers = index === 0 ? [] : [ { ipAddress: '127.0.0.1', wsPort: NETWORK_START_PORT + index - 1, }, ]; const nodePort = NETWORK_START_PORT + index; return new P2P({ connectTimeout: 10000, ackTimeout: 200, seedPeers, wsEngine: 'ws', populatorInterval: 10000, maxOutboundConnections: DEFAULT_MAX_OUTBOUND_CONNECTIONS, maxInboundConnections: DEFAULT_MAX_INBOUND_CONNECTIONS, minimumPeerDiscoveryThreshold: MINIMUM_PEER_DISCOVERY_THRESHOLD, nodeInfo: { wsPort: nodePort, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba', version: '1.0.1', protocolVersion: '1.1', minVersion: '1.0.0', os: platform(), height: 0, broadhash: '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5', nonce: `O2wTkjqplHII${nodePort}`, }, }); }); // Launch nodes one at a time with a delay between each launch. for (const p2p of p2pNodeList) { await p2p.start(); } await wait(200); }); afterEach(async () => { await Promise.all( p2pNodeList .filter(p2p => p2p.isActive) .map(async p2p => await p2p.stop()), ); await wait(100); }); it('should return list of peers with at most the minimum discovery threshold', async () => { const firstP2PNode = p2pNodeList[0]; const { newPeers } = firstP2PNode.getNetworkStatus(); expect(newPeers.length).to.be.at.most(MINIMUM_PEER_DISCOVERY_THRESHOLD); }); }); describe(`When maximum peer discovery response size is set to ${MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE}`, () => { beforeEach(async () => { p2pNodeList = [...new Array(NETWORK_PEER_COUNT).keys()].map(index => { // Each node will have the previous node in the sequence as a seed peer except the first node. const seedPeers = index === 0 ? [] : [ { ipAddress: '127.0.0.1', wsPort: NETWORK_START_PORT + index - 1, }, ]; const nodePort = NETWORK_START_PORT + index; return new P2P({ connectTimeout: 10000, ackTimeout: 200, seedPeers, wsEngine: 'ws', populatorInterval: 10000, maxOutboundConnections: DEFAULT_MAX_OUTBOUND_CONNECTIONS, maxInboundConnections: DEFAULT_MAX_INBOUND_CONNECTIONS, maximumPeerDiscoveryResponseSize: MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE, nodeInfo: { wsPort: nodePort, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba', version: '1.0.1', protocolVersion: '1.1', minVersion: '1.0.0', os: platform(), height: 0, broadhash: '2768b267ae621a9ed3b3034e2e8a1bed40895c621bbb1bbd613d92b9d24e54b5', nonce: `O2wTkjqplHII${nodePort}`, }, }); }); // Launch nodes one at a time with a delay between each launch. for (const p2p of p2pNodeList) { await p2p.start(); } await wait(200); }); afterEach(async () => { await Promise.all( p2pNodeList .filter(p2p => p2p.isActive) .map(async p2p => await p2p.stop()), ); await wait(100); }); it('should return list of peers with less than maximum discovery response size', async () => { const firstP2PNode = p2pNodeList[0]; const { newPeers } = firstP2PNode.getNetworkStatus(); expect(newPeers.length).to.be.lessThan( MAXIMUM_PEER_DISCOVERY_RESPONSE_SIZE, ); }); }); });
<<<<<<< describe('TransactionPool class', () => { let applyTransactionStub = jest.fn(); ======= describe('TransactionList class', () => { let applyTransactionsStub = jest.fn(); >>>>>>> describe('TransactionPool class', () => { let applyTransactionsStub = jest.fn(); <<<<<<< applyTransaction: applyTransactionStub, transactionReorganizationInterval: 1, ======= applyTransactions: applyTransactionsStub, >>>>>>> applyTransactions: applyTransactionsStub, transactionReorganizationInterval: 1,
<<<<<<< '13': 'vote', ======= '14': 'unlock', >>>>>>> '13': 'vote', '14': 'unlock',
<<<<<<< ======= // FIXME: This is log to supress ts build error // Remove this line after using this._transactionExpiryTime debug('TransactionPool expiry time', this._transactionExpiryTime); >>>>>>>
<<<<<<< EVENT_BAN_PEER, EVENT_UNBAN_PEER, ======= EVENT_FAILED_TO_PUSH_NODE_INFO, EVENT_DISCOVERED_PEER, EVENT_FAILED_TO_FETCH_PEER_INFO, >>>>>>> EVENT_BAN_PEER, EVENT_UNBAN_PEER, EVENT_FAILED_TO_PUSH_NODE_INFO, EVENT_DISCOVERED_PEER, EVENT_FAILED_TO_FETCH_PEER_INFO, <<<<<<< private readonly _handleOutboundPeerConnectAbort: ( ======= private readonly _handleDiscoverPeer: ( peerInfo: P2PDiscoveredPeerInfo, ) => void; private readonly _handlePeerConnectAbort: ( >>>>>>> private readonly _handleDiscoverPeer: ( peerInfo: P2PDiscoveredPeerInfo, ) => void; private readonly _handleOutboundPeerConnectAbort: ( <<<<<<< this._handleOutboundPeerConnect = async ( peerInfo: P2PDiscoveredPeerInfo, ) => { ======= // This needs to be an arrow function so that it can be used as a listener. this._handleDiscoverPeer = (peerInfo: P2PDiscoveredPeerInfo) => { // Re-emit the message to allow it to bubble up the class hierarchy. this.emit(EVENT_DISCOVERED_PEER, peerInfo); }; this._handlePeerConnect = async (peerInfo: P2PDiscoveredPeerInfo) => { >>>>>>> // This needs to be an arrow function so that it can be used as a listener. this._handleDiscoverPeer = (peerInfo: P2PDiscoveredPeerInfo) => { // Re-emit the message to allow it to bubble up the class hierarchy. this.emit(EVENT_DISCOVERED_PEER, peerInfo); }; this._handleOutboundPeerConnect = async ( peerInfo: P2PDiscoveredPeerInfo, ) => { <<<<<<< this.addOutboundPeer(peerId, peerInfo); ======= const existingPeer = this.getPeer(peerId); return existingPeer ? existingPeer : this.addPeer(peerInfo); >>>>>>> const existingPeer = this.getPeer(peerId); return existingPeer ? existingPeer : this.addOutboundPeer(peerId, peerInfo); <<<<<<< ======= public addDiscoveredPeer( detailedPeerInfo: P2PDiscoveredPeerInfo, inboundSocket?: SCServerSocket, ): Peer { const peerConfig = { connectTimeout: this._peerPoolConfig.connectTimeout, ackTimeout: this._peerPoolConfig.ackTimeout, }; const peer = new Peer(detailedPeerInfo, peerConfig, { inbound: inboundSocket, }); this._peerMap.set(peer.id, peer); this._bindHandlersToPeer(peer); if (this._nodeInfo) { this._applyNodeInfoOnPeer(peer, this._nodeInfo); } peer.connect(); return peer; } public addInboundPeer( peerId: string, peerInfo: P2PDiscoveredPeerInfo, socket: SCServerSocket, ): boolean { const existingPeer = this.getPeer(peerId); if (existingPeer) { // Update the peerInfo from the latest inbound socket. if (existingPeer.state.inbound === ConnectionState.DISCONNECTED) { existingPeer.inboundSocket = socket; return false; } return false; } this.addPeer(peerInfo, socket); return true; } >>>>>>> <<<<<<< peer.on(EVENT_BAN_PEER, this._handleBanPeer); peer.on(EVENT_UNBAN_PEER, this._handleUnbanPeer); ======= peer.on(EVENT_DISCOVERED_PEER, this._handleDiscoverPeer); >>>>>>> peer.on(EVENT_BAN_PEER, this._handleBanPeer); peer.on(EVENT_UNBAN_PEER, this._handleUnbanPeer); peer.on(EVENT_DISCOVERED_PEER, this._handleDiscoverPeer); <<<<<<< peer.removeListener(EVENT_BAN_PEER, this._handleBanPeer); peer.removeListener(EVENT_UNBAN_PEER, this._handleUnbanPeer); ======= peer.removeListener(EVENT_DISCOVERED_PEER, this._handleDiscoverPeer); >>>>>>> peer.removeListener(EVENT_BAN_PEER, this._handleBanPeer); peer.removeListener(EVENT_UNBAN_PEER, this._handleUnbanPeer); peer.removeListener(EVENT_DISCOVERED_PEER, this._handleDiscoverPeer);
<<<<<<< const [unincludedTransaction, ...transactions] = transactionObjects.map(wrapTransferTransaction); ======= const [unincludedTransaction, ...includedTransactions] = transactions.map(wrapTransferTransaction); >>>>>>> const [unincludedTransaction, ...transactions] = transactionObjects.map( wrapTransferTransaction, ); <<<<<<< queueCheckers.checkTransactionForSenderPublicKey(transactions); const senderProperty: queueCheckers.transactionFilterableKeys = ======= queueCheckers.checkTransactionForSenderPublicKey(includedTransactions); const senderProperty: queueCheckers.TransactionFilterableKeys = >>>>>>> queueCheckers.checkTransactionForSenderPublicKey(transactions); const senderProperty: queueCheckers.TransactionFilterableKeys = <<<<<<< queueCheckers.checkTransactionForId(transactions); const idProperty: queueCheckers.transactionFilterableKeys = 'id'; const transactionIds = transactions.map( ======= queueCheckers.checkTransactionForId(includedTransactions); const idProperty: queueCheckers.TransactionFilterableKeys = 'id'; const transactionIds = includedTransactions.map( >>>>>>> queueCheckers.checkTransactionForId(transactions); const idProperty: queueCheckers.TransactionFilterableKeys = 'id'; const transactionIds = transactions.map( <<<<<<< queueCheckers.checkTransactionForRecipientId(transactions); const recipientProperty: queueCheckers.transactionFilterableKeys = ======= queueCheckers.checkTransactionForRecipientId(includedTransactions); const recipientProperty: queueCheckers.TransactionFilterableKeys = >>>>>>> queueCheckers.checkTransactionForRecipientId(transactions); const recipientProperty: queueCheckers.TransactionFilterableKeys = <<<<<<< it('should call checkTransactionPropertyForValues with transaction type values and type property', () => { queueCheckers.checkTransactionForTypes(transactions); const typeProperty: queueCheckers.transactionFilterableKeys = 'type'; const transactionTypes = transactions.map( ======= it('should call checkTransactionPropertyForValues with transaciton type values and type property', () => { queueCheckers.checkTransactionForTypes(includedTransactions); const typeProperty: queueCheckers.TransactionFilterableKeys = 'type'; const transactionTypes = includedTransactions.map( >>>>>>> it('should call checkTransactionPropertyForValues with transaction type values and type property', () => { queueCheckers.checkTransactionForTypes(transactions); const typeProperty: queueCheckers.TransactionFilterableKeys = 'type'; const transactionTypes = transactions.map(
<<<<<<< const startPM2 = async (installPath: string, name: string): Promise<void> => new Promise<void>((resolve, reject) => { start( { name, script: 'app.js', args: '-c config.json', cwd: installPath, pid: path.join(installPath, '/pids/lisk.app.pid'), output: path.join(installPath, '/logs/lisk.app.log'), error: path.join(installPath, '/logs/lisk.app.err'), log_date_format: 'YYYY-MM-DD HH:mm:ss SSS', watch: false, kill_timeout: 10000, max_memory_restart: '1024M', min_uptime: 20000, max_restarts: 10, }, err => { if (err) { reject(err); return; } resolve(); return; }, ); }); ======= const startPM2 = async (installPath: string, network: string, name: string): Promise<void> => new Promise<void>((resolve, reject) => { start({ name, script: 'app.js', cwd: installPath, env: { LISK_NETWORK: network, }, pid: path.join(installPath, '/pids/lisk.app.pid'), output: path.join(installPath, '/logs/lisk.app.log'), error: path.join(installPath, '/logs/lisk.app.err'), log_date_format: 'YYYY-MM-DD HH:mm:ss SSS', watch: false, kill_timeout: 10000, max_memory_restart: '1024M', min_uptime: 20000, max_restarts: 10, }, err => { if (err) { reject(err); return; } resolve(); return; }) }); >>>>>>> const startPM2 = async ( installPath: string, network: string, name: string, ): Promise<void> => new Promise<void>((resolve, reject) => { start( { name, script: 'app.js', cwd: installPath, env: { LISK_NETWORK: network, }, pid: path.join(installPath, '/pids/lisk.app.pid'), output: path.join(installPath, '/logs/lisk.app.log'), error: path.join(installPath, '/logs/lisk.app.err'), log_date_format: 'YYYY-MM-DD HH:mm:ss SSS', watch: false, kill_timeout: 10000, max_memory_restart: '1024M', min_uptime: 20000, max_restarts: 10, }, err => { if (err) { reject(err); return; } resolve(); return; }, ); }); <<<<<<< new Promise<ReadonlyArray<ProcessDescription>>((resolve, reject) => { list((err, res) => { if (err) { reject(err); return; } resolve(res); }); }); export const registerApplication = async ( installPath: string, name: string, ): Promise<void> => { await connectPM2(); await startPM2(installPath, name); await stopPM2(name); disconnect(); }; ======= new Promise<ReadonlyArray<ProcessDescription>>((resolve, reject) => { list((err, res) => { if (err) { reject(err); return; } resolve(res); }); }); export const registerApplication = async (installPath: string, network: string, name: string): Promise<void> => { await connectPM2(); await startPM2(installPath, network, name); await stopPM2(name); disconnect(); } >>>>>>> new Promise<ReadonlyArray<ProcessDescription>>((resolve, reject) => { list((err, res) => { if (err) { reject(err); return; } resolve(res); }); }); export const registerApplication = async ( installPath: string, network: string, name: string, ): Promise<void> => { await connectPM2(); await startPM2(installPath, network, name); await stopPM2(name); disconnect(); }; <<<<<<< export const describeApplicationByName = async ( name: string, ): Promise<ProcessDescription> => { await connectPM2(); const application = await describePM2(name); disconnect(); ======= export const describeApplication = async (name: string): Promise<ProcessDescription> => { await connectPM2(); const application = await describePM2(name); disconnect(); >>>>>>> export const describeApplication = async ( name: string, ): Promise<ProcessDescription> => { await connectPM2(); const application = await describePM2(name); disconnect();
<<<<<<< export const DEFAULT_BAN_TIME = 86400; ======= export const DEFAULT_SEND_PEER_LIMIT = 25; >>>>>>> export const DEFAULT_BAN_TIME = 86400; export const DEFAULT_SEND_PEER_LIMIT = 25; <<<<<<< : selectForConnection, peerBanTime: config.peerBanTime ? config.peerBanTime : DEFAULT_BAN_TIME, ======= : selectPeersForConnection, sendPeerLimit: config.sendPeerLimit === undefined ? DEFAULT_SEND_PEER_LIMIT : config.sendPeerLimit, >>>>>>> : selectPeersForConnection, sendPeerLimit: config.sendPeerLimit === undefined ? DEFAULT_SEND_PEER_LIMIT : config.sendPeerLimit, peerBanTime: config.peerBanTime ? config.peerBanTime : DEFAULT_BAN_TIME,
<<<<<<< recipientId: 'a28d5e34007fd8fe6d7903044eb23a60fdad3c00', amount: '100', ======= recipientId: '123L', amount: '10000000000', >>>>>>> recipientId: '123L', amount: '10000000000', <<<<<<< recipientId: 'a28d5e34007fd8fe6d7903044eb23a60fdad3c00', amount: '100', ======= recipientId: '123L', amount: '100000000', >>>>>>> recipientId: 'a28d5e34007fd8fe6d7903044eb23a60fdad3c00', amount: '100000000', <<<<<<< recipientId: 'b28d5e34007fd8fe6d7903444eb23a60fdad3c11', amount: '100', ======= recipientId: '124L', amount: '100000000', >>>>>>> recipientId: 'b28d5e34007fd8fe6d7903444eb23a60fdad3c11', amount: '100000000', <<<<<<< recipientId: 'a28d5e34007fd8fe6d7903044eb23a60fdad3c00', amount: '100', ======= recipientId: '123L', amount: '100000000', >>>>>>> recipientId: 'a28d5e34007fd8fe6d7903044eb23a60fdad3c00', amount: '100000000', <<<<<<< recipientId: 'b28d5e34007fd8fe6d7903444eb23a60fdad3c11', amount: '100', ======= recipientId: '124L', amount: '100000000', >>>>>>> recipientId: 'b28d5e34007fd8fe6d7903444eb23a60fdad3c11', amount: '100000000',
<<<<<<< ======= MIN_FEE_PER_BYTE, UNCONFIRMED_MULTISIG_TRANSACTION_TIMEOUT, >>>>>>> MIN_FEE_PER_BYTE, <<<<<<< public readonly timestamp: number; ======= public readonly signatures: string[]; >>>>>>> <<<<<<< this._senderPublicKey = tx.senderPublicKey || ''; this._signatures = (tx.signatures as string[]) || []; ======= this._signature = tx.signature; this.signatures = (tx.signatures as string[]) || []; this._signSignature = tx.signSignature; >>>>>>> this._senderPublicKey = tx.senderPublicKey || ''; this._signatures = (tx.signatures as string[]) || []; <<<<<<< ======= if (this.type !== (this.constructor as typeof BaseTransaction).TYPE) { errors.push( new TransactionError( `Invalid type`, this.id, '.type', this.type, (this.constructor as typeof BaseTransaction).TYPE, ), ); } const transactionBytes = this.getBasicBytes(); if (this.fee < this.minFee) { errors.push( new TransactionError( `Insufficient transaction fee. Minimum required fee is: ${this.minFee.toString()}`, this.id, '.fee', this.fee.toString(), ), ); } if ( this._networkIdentifier === undefined || this._networkIdentifier === '' ) { throw new Error( 'Network identifier is required to validate a transaction ', ); } const networkIdentifierBytes = hexToBuffer(this._networkIdentifier); const transactionWithNetworkIdentifierBytes = Buffer.concat([ networkIdentifierBytes, transactionBytes, ]); >>>>>>> <<<<<<< if (this.type !== (this.constructor as typeof BaseTransaction).TYPE) { errors.push( new TransactionError( `Invalid transaction type`, this.id, '.type', this.type, (this.constructor as typeof BaseTransaction).TYPE, ), ); } ======= const { valid: signatureValid, error: verificationError, } = validateSignature( this.senderPublicKey, this.signature, transactionWithNetworkIdentifierBytes, this.id, ); if (!signatureValid && verificationError) { errors.push(verificationError); } >>>>>>> if (this.type !== (this.constructor as typeof BaseTransaction).TYPE) { errors.push( new TransactionError( `Invalid transaction type`, this.id, '.type', this.type, (this.constructor as typeof BaseTransaction).TYPE, ), ); } if (this.fee < this.minFee) { errors.push( new TransactionError( `Insufficient transaction fee. Minimum required fee is: ${this.minFee.toString()}`, this.id, '.fee', this.fee.toString(), ), ); }
<<<<<<< import { FormEvent, RefObject, SyntheticEvent } from "react"; ======= import { FocusEvent, RefObject } from "react"; >>>>>>> import { FormEvent, FocusEvent, RefObject, SyntheticEvent } from "react"; <<<<<<< handleSubmit: HandleSubmit; controller: Controller<any, V>; ======= controller: Controller<V>; >>>>>>> handleSubmit: HandleSubmit; controller: Controller<V>;
<<<<<<< form: RefObject<HTMLFormElement>; field: Field<V>; ======= formRef: RefObject<HTMLFormElement>; field: FieldRef<V>; >>>>>>> form: RefObject<HTMLFormElement>; field: FieldRef<V>;
<<<<<<< describe('errors', () => { it('raises error when folder does not exist', async () => { const testRepoPath = path.join(temp.path(), 'desktop-does-not-exist') let error: Error | null = null try { await GitProcess.execWithOutput([ 'show', 'HEAD' ], testRepoPath) } catch (e) { error = e } expect(error!.message).to.equal('Unable to find path to repository on disk.') }) it('can parse errors', () => { const error = GitProcess.parseError('fatal: Authentication failed') expect(error).to.equal(GitError.SSHAuthenticationFailed) }) it('can parse bad revision errors', () => { const error = GitProcess.parseError("fatal: bad revision 'beta..origin/beta'") expect(error).to.equal(GitError.BadRevision) }) ======= it('raises error when folder does not exist', async () => { const testRepoPath = path.join(temp.path(), 'desktop-does-not-exist') let error: Error | null = null try { await GitProcess.exec([ 'show', 'HEAD' ], testRepoPath) } catch (e) { error = e } expect(error!.message).to.equal('Unable to find path to repository on disk.') }) it('can parse errors', () => { const error = GitProcess.parseError('fatal: Authentication failed') expect(error).to.equal(GitError.SSHAuthenticationFailed) >>>>>>> describe('errors', () => { it('raises error when folder does not exist', async () => { const testRepoPath = path.join(temp.path(), 'desktop-does-not-exist') let error: Error | null = null try { await GitProcess.exec([ 'show', 'HEAD' ], testRepoPath) } catch (e) { error = e } expect(error!.message).to.equal('Unable to find path to repository on disk.') }) it('can parse errors', () => { const error = GitProcess.parseError('fatal: Authentication failed') expect(error).to.equal(GitError.SSHAuthenticationFailed) }) it('can parse bad revision errors', () => { const error = GitProcess.parseError("fatal: bad revision 'beta..origin/beta'") expect(error).to.equal(GitError.BadRevision) })
<<<<<<< import { Component, EventEmitter, Input, Output } from '@angular/core'; import { HotkeyGroup, HotkeysService } from '../hotkeys.service'; ======= import { Component } from '@angular/core'; import { HotkeysService } from '../hotkeys.service'; >>>>>>> import { Component, EventEmitter, Input, Output } from '@angular/core'; import { HotkeysService } from '../hotkeys.service';
<<<<<<< export class PdfViewerComponent extends OnInit { private static CSS_UNITS: number = 96.0 / 72.0; private _showAll: boolean = true; // TODO : _showAll is not working ======= export class PdfViewerComponent implements OnChanges { private _showAll: boolean = false; >>>>>>> export class PdfViewerComponent implements OnChanges, OnInit { private static CSS_UNITS: number = 96.0 / 72.0; private _showAll: boolean = true; // TODO : _showAll is not working <<<<<<< private isInitialised: boolean = false; private lastLoaded: string; private _enhanceTextSelection: boolean = false; private _pageBorder: boolean = false; private _externalLinkTarget: string = 'blank'; private _pdfViewer: any; private _pdfLinkService: any; @Input('after-load-complete') afterLoadComplete: Function; ======= >>>>>>> private _enhanceTextSelection: boolean = false; private _pageBorder: boolean = false; private _externalLinkTarget: string = 'blank'; private _pdfViewer: any; private _pdfLinkService: any; <<<<<<< this.render(); this.wasInvalidPage = false; } else if (isNaN(_page)) { this.pageChange.emit(null); } else if (!this.wasInvalidPage) { this.wasInvalidPage = true; this.pageChange.emit(this._page); ======= this.pageChange.emit(_page); >>>>>>> this.pageChange.emit(_page); <<<<<<< if (this._pdf) { this.setupViewer(); } } @Input('render-link') set renderLink(renderLink) { this._renderLink = renderLink; if (this._pdf) { this.setupViewer(); } ======= >>>>>>> if (this._pdf) { this.setupViewer(); } } @Input('render-link') set renderLink(renderLink) { this._renderLink = renderLink; if (this._pdf) { this.setupViewer(); } <<<<<<< if (this._pdf) { this.updateSize(); } ======= >>>>>>> if (this._pdf) { this.updateSize(); } <<<<<<< if (this._pdf) { this.render(); } } @Input('stick-to-page') set stickToPage(value: boolean) { this._stickToPage = value; if (this._pdf) { this.render(); } ======= >>>>>>> } @Input('stick-to-page') set stickToPage(value: boolean) { this._stickToPage = value; <<<<<<< if (this._pdf) { this.updateSize(); } ======= >>>>>>> if (this._pdf) { this.updateSize(); } <<<<<<< if (this._renderLink) { this._pdfLinkService = new PDFJS.PDFLinkService(); pdfOptions['linkService'] = this._pdfLinkService; } if (!this._pageBorder) { pdfOptions['removePageBorders'] = true; } ======= this.renderPage(page++).then(() => { if (page <= this._pdf.numPages) { return this.renderPage(page++); } }); } >>>>>>> if (this._renderLink) { this._pdfLinkService = new PDFJS.PDFLinkService(); pdfOptions.linkService = this._pdfLinkService; } if (!this._pageBorder) { pdfOptions.removePageBorders = true; }
<<<<<<< import { ComponentInt, ComponentsInt, PropInt, ChildInt } from '../utils/Interfaces.ts'; ======= import { ComponentInt, ComponentsInt, PropInt, ChildInt, Action, ApplicationStateInt } from '../utils/Interfaces.ts'; >>>>>>> import { ComponentInt, ComponentsInt, PropInt, ChildInt, Action, ApplicationStateInt } from '../utils/Interfaces.ts'; <<<<<<< } from '../actionTypes/index.js'; ======= } from '../actionTypes/index.ts'; >>>>>>> } from '../actionTypes/index.ts'; <<<<<<< payload: imageSource }); ======= payload: { imageSource }, }) >>>>>>> payload: { imageSource } }); <<<<<<< export const changeFocusComponent = ({ title }: { title: string }) => (dispatch: any) => { ======= export const changeFocusComponent = ({ title }: { title: string }) => (dispatch: (arg: Action) => void) => { >>>>>>> export const changeFocusComponent = ({ title }: { title: string }) => ( dispatch: (arg: Action) => void ) => { <<<<<<< export const changeFocusChild = ({ childId }: { childId: number }) => (dispatch: any) => { ======= export const changeFocusChild = ({ childId }: { childId: number }) => (dispatch: (arg: Action) => void) => { >>>>>>> export const changeFocusChild = ({ childId }: { childId: number }) => ( dispatch: (arg: Action) => void ) => { <<<<<<< type: DELETE_IMAGE, payload: '' }); ======= type: DELETE_IMAGE }) >>>>>>> type: DELETE_IMAGE }); <<<<<<< export const updateHtmlAttr = ({ attr, value }: { attr: string; value: string }) => ( dispatch: any ) => { ======= export const updateHtmlAttr = ({ attr, value }: { attr: string; value: string }) => ( dispatch: (arg: Action) => void, ) => { >>>>>>> export const updateHtmlAttr = ({ attr, value }: { attr: string; value: string }) => ( dispatch: (arg: Action) => void ) => { <<<<<<< export const updateChildrenSort = ({ newSortValues }: { newSortValues: any }) => ( dispatch: any ) => { dispatch({ type: UPDATE_CHILDREN_SORT, payload: { newSortValues } }); }; ======= //Action reserved for SortChildren component not written yet // export const updateChildrenSort = ({ newSortValues }: { newSortValues: any }) => ( // dispatch: (arg: Action) => void, // ) => { // dispatch({ // type: UPDATE_CHILDREN_SORT, // payload: { newSortValues }, // }); // }; >>>>>>> //Action reserved for SortChildren component not written yet // export const updateChildrenSort = ({ newSortValues }: { newSortValues: any }) => ( // dispatch: (arg: Action) => void, // ) => { // dispatch({ // type: UPDATE_CHILDREN_SORT, // payload: { newSortValues }, // }); // };
<<<<<<< preferImmutableCall?: boolean; ======= } export interface DepSymbolResolver { shouldSymbolDefinitelyBeIgnoreInDeps: ( rawSymbol: ts.Symbol ) => boolean | undefined; alreadyDuplicated: (rawSymbol: ts.Symbol) => boolean; markAsDuplicated: (symbol: ts.Symbol) => void; isExpressionContainsDeclaredInner: (expr: ts.Node) => boolean | undefined; markExpressionContainsDeclaredInner: ( expr: ts.Node, value: boolean ) => void; >>>>>>> preferImmutableCall?: boolean; } export interface DepSymbolResolver { shouldSymbolDefinitelyBeIgnoreInDeps: ( rawSymbol: ts.Symbol ) => boolean | undefined; alreadyDuplicated: (rawSymbol: ts.Symbol) => boolean; markAsDuplicated: (symbol: ts.Symbol) => void; isExpressionContainsDeclaredInner: (expr: ts.Node) => boolean | undefined; markExpressionContainsDeclaredInner: ( expr: ts.Node, value: boolean ) => void;
<<<<<<< import { SchemaRequestService, WorkspaceContextService, PromiseConstructor, Thenable, MatchingSchema, TextDocument } from '../jsonLanguageTypes'; ======= import { SchemaRequestService, WorkspaceContextService, PromiseConstructor, Thenable } from '../jsonLanguageTypes'; >>>>>>> import { SchemaRequestService, WorkspaceContextService, PromiseConstructor, Thenable, MatchingSchema, TextDocument } from '../jsonLanguageTypes'; <<<<<<< private normalizeId(id: string) { // remove trailing '#', normalize drive capitalization try { return URI.parse(id).toString(); } catch (e) { return id; } } ======= >>>>>>>
<<<<<<< import * as EventEmitter from 'eventemitter2'; import { ExtensionConfiguration } from './extensionConfiguration'; import { setupLiveShare } from './liveShare'; import ContentProvider from './contentProvider'; ======= >>>>>>> <<<<<<< setupLiveShare(windowManager); } export class BrowserViewWindowManager extends EventEmitter.EventEmitter2 { public openWindows: Set<BrowserViewWindow>; private browser: any; private defaultConfig: ExtensionConfiguration; constructor(extensionPath: string) { super(); this.openWindows = new Set(); this.defaultConfig = { extensionPath: extensionPath, startUrl: 'http://code.visualstudio.com', format: 'jpeg', columnNumber: 2 }; this.refreshSettings(); } private refreshSettings() { let extensionSettings = vscode.workspace.getConfiguration('browser-preview'); if (extensionSettings) { let chromeExecutable = extensionSettings.get<string>('chromeExecutable'); if (chromeExecutable !== undefined) { this.defaultConfig.chromeExecutable = chromeExecutable; } let startUrl = extensionSettings.get<string>('startUrl'); if (startUrl !== undefined) { this.defaultConfig.startUrl = startUrl; } let isVerboseMode = extensionSettings.get<boolean>('verbose'); if (isVerboseMode !== undefined) { this.defaultConfig.isVerboseMode = isVerboseMode; } let format = extensionSettings.get<string>('format'); if (format !== undefined) { this.defaultConfig.format = format.includes('png') ? 'png' : 'jpeg'; } } } getLastColumnNumber() { let lastWindow = Array.from(this.openWindows).pop(); if (lastWindow) { return lastWindow.config.columnNumber; } return 1; } public create(startUrl?: string, title?: string) { this.refreshSettings(); let config = { ...this.defaultConfig }; if (!this.browser) { this.browser = new Browser(config); } let lastColumnNumber = this.getLastColumnNumber(); if (lastColumnNumber) { config.columnNumber = lastColumnNumber + 1; } let window = new BrowserViewWindow(config, this.browser); window.launch(startUrl, title); window.once('disposed', () => { this.openWindows.delete(window); if (this.openWindows.size === 0) { this.browser.dispose(); this.browser = null; } }); window.on('windowOpenRequested', (params) => { this.emit('windowOpenRequested', params); }); this.openWindows.add(window); } public getDebugPort() { return this.browser ? this.browser.remoteDebugPort : null; } public disposeByUrl(url: string) { this.openWindows.forEach((b: BrowserViewWindow) => { if (b.config.startUrl == url) { b.dispose(); } }); } } export const PANEL_TITLE = 'Browser Preview'; export class BrowserViewWindow extends EventEmitter.EventEmitter2 { private static readonly viewType = 'browser-preview'; private _panel: vscode.WebviewPanel | null; private _disposables: vscode.Disposable[] = []; private contentProvider: ContentProvider; public browserPage: BrowserPage | null; private browser: Browser; public config: ExtensionConfiguration; constructor(config: ExtensionConfiguration, browser: Browser) { super(); this.config = config; this._panel = null; this.browserPage = null; this.browser = browser; this.contentProvider = new ContentProvider(this.config); } public async launch(startUrl?: string, title: string = PANEL_TITLE) { try { this.browserPage = await this.browser.newPage(); if (this.browserPage) { this.browserPage.else((data: any) => { if (this._panel) { this._panel.webview.postMessage(data); } }); this.emit('windowCreated', this.browserPage); } } catch (err) { vscode.window.showErrorMessage(err.message); } // let columnNumber = <number>this.config.columnNumber; // var column = <any>vscode.ViewColumn[columnNumber]; let showOptions = { viewColumn: vscode.ViewColumn.Beside }; this._panel = vscode.window.createWebviewPanel(BrowserViewWindow.viewType, title, showOptions, { enableScripts: true, retainContextWhenHidden: true, localResourceRoots: [vscode.Uri.file(path.join(this.config.extensionPath, 'build'))] }); this._panel.webview.html = this.contentProvider.getContent(); this._panel.onDidDispose(() => this.dispose(), null, this._disposables); this._panel.webview.onDidReceiveMessage( (msg) => { if (msg.type === 'extension.updateTitle') { if (this._panel) { this._panel.title = msg.params.title; return; } } if (msg.type === 'extension.windowOpenRequested') { this.emit('windowOpenRequested', { url: msg.params.url }); } if (msg.type === 'extension.openFile') { let uri = vscode.Uri.file(msg.params.uri); let lineNumber = msg.params.lineNumber; // Open document vscode.workspace.openTextDocument(uri).then( (document: vscode.TextDocument) => { // Show the document vscode.window.showTextDocument(document, vscode.ViewColumn.One).then( (document) => { if (lineNumber) { document.revealRange( new vscode.Range(lineNumber, 0, lineNumber, 0), vscode.TextEditorRevealType.InCenter ); } }, (reason) => { vscode.window.showErrorMessage(`Failed to show file. ${reason}`); } ); }, (err) => { vscode.window.showErrorMessage(`Failed to open file. ${err}`); } ); } if (msg.type === 'extension.windowDialogRequested') { const { message, type } = msg.params; if (type == 'alert') { vscode.window.showInformationMessage(message); if (this.browserPage) { this.browserPage.send('Page.handleJavaScriptDialog', { accept: true }); } } else if (type === 'prompt') { vscode.window.showInputBox({ placeHolder: message }).then((result) => { if (this.browserPage) { this.browserPage.send('Page.handleJavaScriptDialog', { accept: true, promptText: result }); } }); } else if (type === 'confirm') { vscode.window.showQuickPick(['Ok', 'Cancel']).then((result) => { if (this.browserPage) { this.browserPage.send('Page.handleJavaScriptDialog', { accept: result === 'Ok' }); } }); } } if (this.browserPage) { try { this.browserPage.send(msg.type, msg.params, msg.callbackId); } catch (err) { vscode.window.showErrorMessage(err); } } }, null, this._disposables ); // Update starturl if requested to launch specifi page. if (startUrl) { this.config.startUrl = startUrl; } this._panel.webview.postMessage({ method: 'extension.appConfiguration', result: this.config }); } public dispose() { if (this._panel) { this._panel.dispose(); } if (this.browserPage) { this.browserPage.dispose(); this.browserPage = null; } while (this._disposables.length) { const x = this._disposables.pop(); if (x) { x.dispose(); } } this.emit('disposed'); this.removeAllListeners(); } ======= >>>>>>> setupLiveShare(windowManager);
<<<<<<< import 'intersection-observer-polyfill' import { store } from './store' ======= import { createBrowserHistory } from 'history' import { createStore } from './store' >>>>>>> import { createBrowserHistory } from 'history' import 'intersection-observer-polyfill' import { createStore } from './store'
<<<<<<< getBudgetMonth(budgetId: string, month: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<MonthDetailResponse>; getBudgetMonths(budgetId: string, options?: any): (fetchFunction?: FetchAPI) => Promise<MonthSummariesResponse>; ======= getBudgetMonth(budgetId: string, month: string | Date, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<MonthDetailResponse>; getBudgetMonths(budgetId: string, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<MonthSummariesResponse>; >>>>>>> getBudgetMonth(budgetId: string, month: string | Date, options?: any): (fetchFunction?: FetchAPI) => Promise<MonthDetailResponse>; getBudgetMonths(budgetId: string, options?: any): (fetchFunction?: FetchAPI) => Promise<MonthSummariesResponse>; <<<<<<< export declare const MonthsApiFactory: (configuration?: Configuration) => { getBudgetMonth(budgetId: string, month: Date, options?: any): Promise<MonthDetailResponse>; ======= export declare const MonthsApiFactory: (configuration?: Configuration, fetchFunction?: FetchAPI, basePath?: string) => { getBudgetMonth(budgetId: string, month: string | Date, options?: any): Promise<MonthDetailResponse>; >>>>>>> export declare const MonthsApiFactory: (configuration?: Configuration) => { getBudgetMonth(budgetId: string, month: string | Date, options?: any): Promise<MonthDetailResponse>; <<<<<<< getTransactions(budgetId: string, sinceDate?: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse>; getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse>; getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse>; getTransactionsById(budgetId: string, transactionId: string, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionDetailResponse>; ======= getTransactions(budgetId: string, sinceDate?: string | Date, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionSummariesResponse>; getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: string | Date, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionSummariesResponse>; getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: string | Date, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionSummariesResponse>; getTransactionsById(budgetId: string, transactionId: string, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionDetailResponse>; >>>>>>> getTransactions(budgetId: string, sinceDate?: string | Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse>; getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: string | Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse>; getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: string | Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse>; getTransactionsById(budgetId: string, transactionId: string, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionDetailResponse>; <<<<<<< export declare const TransactionsApiFactory: (configuration?: Configuration) => { getTransactions(budgetId: string, sinceDate?: Date, options?: any): Promise<TransactionSummariesResponse>; getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date, options?: any): Promise<TransactionSummariesResponse>; getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date, options?: any): Promise<TransactionSummariesResponse>; ======= export declare const TransactionsApiFactory: (configuration?: Configuration, fetchFunction?: FetchAPI, basePath?: string) => { getTransactions(budgetId: string, sinceDate?: string | Date, options?: any): Promise<TransactionSummariesResponse>; getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: string | Date, options?: any): Promise<TransactionSummariesResponse>; getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: string | Date, options?: any): Promise<TransactionSummariesResponse>; >>>>>>> export declare const TransactionsApiFactory: (configuration?: Configuration) => { getTransactions(budgetId: string, sinceDate?: string | Date, options?: any): Promise<TransactionSummariesResponse>; getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: string | Date, options?: any): Promise<TransactionSummariesResponse>; getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: string | Date, options?: any): Promise<TransactionSummariesResponse>;
<<<<<<< getBudgetMonth(budgetId: string, month: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<MonthDetailResponse> { ======= getBudgetMonth(budgetId: string, month: Date | string, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<MonthDetailResponse> { >>>>>>> getBudgetMonth(budgetId: string, month: Date | string, options?: any): (fetchFunction?: FetchAPI) => Promise<MonthDetailResponse> { <<<<<<< getBudgetMonth(budgetId: string, month: Date, options?: any) { return MonthsApiFp(configuration).getBudgetMonth(budgetId, month, options)(); ======= getBudgetMonth(budgetId: string, month: Date | string, options?: any) { return MonthsApiFp(configuration).getBudgetMonth(budgetId, month, options)(fetchFunction, basePath); >>>>>>> getBudgetMonth(budgetId: string, month: Date | string, options?: any) { return MonthsApiFp(configuration).getBudgetMonth(budgetId, month, options)(); <<<<<<< public getBudgetMonth(budgetId: string, month: Date, options?: any) { return MonthsApiFp(this.configuration).getBudgetMonth(budgetId, month, options)(); ======= public getBudgetMonth(budgetId: string, month: Date | string, options?: any) { return MonthsApiFp(this.configuration).getBudgetMonth(budgetId, month, options)(this.fetchFunction, this.basePath); >>>>>>> public getBudgetMonth(budgetId: string, month: Date | string, options?: any) { return MonthsApiFp(this.configuration).getBudgetMonth(budgetId, month, options)(); <<<<<<< getTransactions(budgetId: string, sinceDate?: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse> { ======= getTransactions(budgetId: string, sinceDate?: Date | string, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionSummariesResponse> { >>>>>>> getTransactions(budgetId: string, sinceDate?: Date | string, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse> { <<<<<<< getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse> { ======= getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date | string, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionSummariesResponse> { >>>>>>> getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date | string, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse> { <<<<<<< getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse> { ======= getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date | string, options?: any): (fetchFunction?: FetchAPI, basePath?: string) => Promise<TransactionSummariesResponse> { >>>>>>> getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date | string, options?: any): (fetchFunction?: FetchAPI) => Promise<TransactionSummariesResponse> { <<<<<<< public getTransactions(budgetId: string, sinceDate?: Date, options?: any) { return TransactionsApiFp(this.configuration).getTransactions(budgetId, sinceDate, options)(); ======= public getTransactions(budgetId: string, sinceDate?: Date | string, options?: any) { return TransactionsApiFp(this.configuration).getTransactions(budgetId, sinceDate, options)(this.fetchFunction, this.basePath); >>>>>>> public getTransactions(budgetId: string, sinceDate?: Date | string, options?: any) { return TransactionsApiFp(this.configuration).getTransactions(budgetId, sinceDate, options)(); <<<<<<< public getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date, options?: any) { return TransactionsApiFp(this.configuration).getTransactionsByAccount(budgetId, accountId, sinceDate, options)(); ======= public getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date | string, options?: any) { return TransactionsApiFp(this.configuration).getTransactionsByAccount(budgetId, accountId, sinceDate, options)(this.fetchFunction, this.basePath); >>>>>>> public getTransactionsByAccount(budgetId: string, accountId: string, sinceDate?: Date | string, options?: any) { return TransactionsApiFp(this.configuration).getTransactionsByAccount(budgetId, accountId, sinceDate, options)(); <<<<<<< public getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date, options?: any) { return TransactionsApiFp(this.configuration).getTransactionsByCategory(budgetId, categoryId, sinceDate, options)(); ======= public getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date | string, options?: any) { return TransactionsApiFp(this.configuration).getTransactionsByCategory(budgetId, categoryId, sinceDate, options)(this.fetchFunction, this.basePath); >>>>>>> public getTransactionsByCategory(budgetId: string, categoryId: string, sinceDate?: Date | string, options?: any) { return TransactionsApiFp(this.configuration).getTransactionsByCategory(budgetId, categoryId, sinceDate, options)();
<<<<<<< faMoon, faSun, ======= faCheckCircle, >>>>>>> faMoon, faSun, faCheckCircle, <<<<<<< faMoon, faSun, ======= faCheckCircle, >>>>>>> faMoon, faSun, faCheckCircle,
<<<<<<< import { isNodeExported, findPiralBaseApi, findDeclaredTypings } from './helpers'; import { includeExportedType, includeExportedVariable, includeExportedTypeAlias } from './visit'; ======= import { isNodeExported, findPiralCoreApi, findDeclaredTypings } from './helpers'; >>>>>>> import { isNodeExported, findPiralBaseApi, findDeclaredTypings } from './helpers';
<<<<<<< export * from './avalanche'; ======= >>>>>>> export * from './avalanche'; <<<<<<< export * from './apis/admin/api'; export * from './apis/keystore/api'; export * from './apis/platform/api'; ======= export * from './utils/types'; >>>>>>> export * from './apis/admin/api'; export * from './apis/keystore/api'; export * from './apis/platform/api';
<<<<<<< import { pipeline, logger, dateToUnixTimeSeconds } from '../utils' ======= import { pipelineAsync, logger } from '../utils' >>>>>>> import { pipelineAsync, logger, dateToUnixTimeSeconds } from '../utils'
<<<<<<< this.userId = params.userId || params.email; // Riot uses `email` when placing a conference call this.isAudioOnly = params.isAudioOnly === 'true'; this.toggleVideo = !this.isAudioOnly; ======= this.userId = params.userId || params.email; // Element uses `email` when placing a conference call >>>>>>> this.userId = params.userId || params.email; // Element uses `email` when placing a conference call this.isAudioOnly = params.isAudioOnly === 'true'; this.toggleVideo = !this.isAudioOnly;
<<<<<<< import WebhookBridgeRecord from "./models/WebhookBridgeRecord"; ======= import TelegramBridgeRecord from "./models/TelegramBridgeRecord"; >>>>>>> import TelegramBridgeRecord from "./models/TelegramBridgeRecord"; import WebhookBridgeRecord from "./models/WebhookBridgeRecord"; <<<<<<< WebhookBridgeRecord, ======= TelegramBridgeRecord, >>>>>>> TelegramBridgeRecord, WebhookBridgeRecord,
<<<<<<< import { AdminWidgetWhiteboardConfigComponent } from "./whiteboard/whiteboard.component"; ======= import { TranslateService } from "@ngx-translate/core"; >>>>>>> import { AdminWidgetWhiteboardConfigComponent } from "./whiteboard/whiteboard.component"; import { TranslateService } from "@ngx-translate/core";
<<<<<<< import { GenericNotificationHandler, LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'; ======= import { LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'; import { getGVMConfig } from './graalVMConfiguration'; >>>>>>> import { GenericNotificationHandler, LanguageClient, LanguageClientOptions, StreamInfo } from 'vscode-languageclient'; import { getGVMConfig } from './graalVMConfiguration';
<<<<<<< process.exitCode = validate(input, getFilteredIds(filter, input), path.join(__dirname, '../node_modules/lsif-protocol/lib/protocol.d.ts')); ======= process.exitCode = validate( input, getFilteredIds(filter, input), path.join(path.dirname(process.argv[1]), '../node_modules/lsif-protocol/lib/protocol.d.ts')); >>>>>>> process.exitCode = validate( input, getFilteredIds(filter, input), path.join(__dirname, '../node_modules/lsif-protocol/lib/protocol.d.ts'));
<<<<<<< * Initializes the Schema templates and block templates. ======= * Removes all line breaks from a string. * * @returns {string} The converted string. */ function getTemplate(): string { return this.innerHTML.split( "\n" ).map( s => s.trim() ).join( "" ); } /** * Initializes schema-templates. >>>>>>> * Removes all line breaks from a string. * * @returns {string} The converted string. */ function getTemplate(): string { return this.innerHTML.split( "\n" ).map( s => s.trim() ).join( "" ); } /** * Initializes the Schema templates and block templates.
<<<<<<< import { InstructionObject } from "../../core/Instruction"; ======= import { RenderEditProps } from "../../core/blocks/BlockDefinition"; import { getBlockByClientId } from "../../functions/BlockHelper"; import RequiredBlocks from "../../blocks/RequiredBlocks"; >>>>>>> import { RenderEditProps } from "../../core/blocks/BlockDefinition"; import { getBlockByClientId } from "../../functions/BlockHelper"; import RequiredBlocks from "../../blocks/RequiredBlocks"; import { InstructionObject } from "../../core/Instruction";
<<<<<<< import { BlockInstance } from "@wordpress/blocks"; import { isArray, mergeWith } from "lodash"; ======= import { merge } from "lodash"; import { BlockInstance } from "@wordpress/blocks"; import { BlockValidation, BlockValidationResult } from "./validation"; >>>>>>> import { BlockValidation, BlockValidationResult } from "./validation"; import { BlockInstance } from "@wordpress/blocks"; import { isArray, mergeWith } from "lodash";