conflict_resolution
stringlengths
27
16k
<<<<<<< export const getLoginFormMessage = compose(fromNotificationReducer.getLoginMessage, getNotificationState); // ===================Instagram list states and compose methods ================================================ function getInstagramState(state: State): fromInstagramReducer.State { return state.instagramMedia; } export const getInstagramMedia = createSelector(getInstagramState, fromInstagramReducer.getInstagramMedia); ======= export const getLoginFormMessage = compose(fromNotificationReducer.getLoginMessage, getNotificationState); export const getSignUpFormMessage = compose(fromNotificationReducer.getSignUpMessage, getNotificationState); >>>>>>> export const getLoginFormMessage = compose(fromNotificationReducer.getLoginMessage, getNotificationState); export const getSignUpFormMessage = compose(fromNotificationReducer.getSignUpMessage, getNotificationState); // ===================Instagram list states and compose methods ================================================ function getInstagramState(state: State): fromInstagramReducer.State { return state.instagramMedia; } export const getInstagramMedia = createSelector(getInstagramState, fromInstagramReducer.getInstagramMedia);
<<<<<<< if (options.legacyProof) { ======= if (options && options.legacyProof) { >>>>>>> if (options && options.legacyProof) { <<<<<<< } else { return this.posRootChainManager.exitERC20Hermoine(txHash, options) ======= } else { return this.posRootChainManager.exitERC20Hermoine(txHash, options) } } isERC20ExitProcessed(txHash: string) { if (!txHash) { throw new Error(`txHash not provided`) >>>>>>> } else { return this.posRootChainManager.exitERC20Hermoine(txHash, options) } } isERC20ExitProcessed(txHash: string) { if (!txHash) { throw new Error(`txHash not provided`) <<<<<<< if (options.legacyProof) { ======= if (options && options.legacyProof) { >>>>>>> if (options && options.legacyProof) { <<<<<<< exitBatchERC721(txHash: string, options?: SendOptions) { if (!txHash) { throw new Error(`txHash not provided`) } if (options && !options.from) { throw new Error(`options.from is missing`) } return this.posRootChainManager.exitBatchERC721(txHash, options) } ======= isERC721ExitProcessed(txHash: string) { if (!txHash) { throw new Error(`txHash not provided`) } return this.posRootChainManager.isERC721ExitProcessed(txHash) } >>>>>>> exitBatchERC721(txHash: string, options?: SendOptions) { if (!txHash) { throw new Error(`txHash not provided`) } if (options && !options.from) { throw new Error(`options.from is missing`) } return this.posRootChainManager.exitBatchERC721(txHash, options) } isERC721ExitProcessed(txHash: string) { if (!txHash) { throw new Error(`txHash not provided`) } return this.posRootChainManager.isERC721ExitProcessed(txHash) } <<<<<<< if (options.legacyProof) { ======= if (options && options.legacyProof) { >>>>>>> if (options && options.legacyProof) { <<<<<<< if (options.legacyProof) { ======= if (options && options.legacyProof) { >>>>>>> if (options && options.legacyProof) {
<<<<<<< import { Component, OnInit } from '@angular/core'; ======= import { Component } from '@angular/core'; import { UserProfile } from '../../../models/user-profile'; import { LikeTripAction } from '../../../actions/trips.action'; >>>>>>> import { Component, OnInit } from '@angular/core'; <<<<<<< export class TripDetailComponent implements OnInit { trip$: Observable<any>; loggedInUser$: Observable<UserProfile>; trip: Trip; userTrip: boolean; ======= export class TripDetailComponent { trip: any = {}; user: any = {}; >>>>>>> export class TripDetailComponent implements OnInit { trip$: Observable<any>; loggedInUser$: Observable<UserProfile>; trip: Trip; userTrip: boolean; user: any = {};
<<<<<<< import { Observable } from 'rxjs/Observable'; ======= import { LikeTripAction } from './../../../../actions/trips.action'; >>>>>>> import { Observable } from 'rxjs/Observable'; import { LikeTripAction } from './../../../../actions/trips.action'; <<<<<<< ======= constructor( private router: Router, private store: Store<State>, private authService: UserAuthService ) { } ngOnInit() { this.state.like = (this.trip.is_liked_by_current_user ? 'active' : 'inactive'); } >>>>>>>
<<<<<<< updateHeader(evt) { this.currPos = (window.pageYOffset || evt.target.scrollTop) - (evt.target.clientTop || 0); if(this.currPos >= this.changePos ) { this.isScrolled = true; } else { this.isScrolled = false; } } login() { // Firebase authentication // this.store.dispatch(new LoginAction); // this.store.dispatch(new ServerLoginAction); } ======= >>>>>>> updateHeader(evt) { this.currPos = (window.pageYOffset || evt.target.scrollTop) - (evt.target.clientTop || 0); if(this.currPos >= this.changePos ) { this.isScrolled = true; } else { this.isScrolled = false; } }
<<<<<<< import { OtherDetailsComponent } from './user-settings/other-details/other-details.component'; ======= import { ChangePasswordComponent } from './user-settings/change-password/change-password.component'; >>>>>>> import { OtherDetailsComponent } from './user-settings/other-details/other-details.component'; import { ChangePasswordComponent } from './user-settings/change-password/change-password.component'; <<<<<<< OtherDetailsComponent, UserTripsComponent ======= UserTripsComponent, ChangePasswordComponent >>>>>>> OtherDetailsComponent, UserTripsComponent, ChangePasswordComponent
<<<<<<< import { TripsService } from './../../../services/trips.service'; ======= import { environment } from './../../../../environments/environment'; import { TripsService } from './../../../services/trips.service'; >>>>>>> import { environment } from './../../../../environments/environment'; <<<<<<< constructor(private store: Store<fromRoot.State>, private tripService: TripsService) { ======= constructor(private store: Store<fromRoot.State>, private ng2cable: Ng2Cable, private broadcaster: Broadcaster, private tripsService: TripsService) { this.ng2cable.subscribe(`${this.apiLink}/cable`, 'CommentsChannel'); >>>>>>> constructor(private store: Store<fromRoot.State>, private ng2cable: Ng2Cable, private broadcaster: Broadcaster) { this.ng2cable.subscribe(`${this.apiLink}/cable`, 'CommentsChannel'); <<<<<<< this.tripService.increase_view_count() ======= // init listener this.broadcaster.on<string>('CreateComments').subscribe( message => { this.store.dispatch(new LoadCommentsAction(this.selectedTripId)); } ); >>>>>>> // init listener this.broadcaster.on<string>('CreateComments').subscribe( message => { this.store.dispatch(new LoadCommentsAction(this.selectedTripId)); } );
<<<<<<< private $scope: any; private $modal: any; private $http: any; //ng.IHttpProvider causes errors private template: ArmTemplate; private graph: Graph; private loadUrl: string; //Url from the address bar private loadedUrl: string; toolboxItems: ToolboxResource[]; ======= private $scope:any; private $modal:any; private $http:any; //ng.IHttpProvider causes errors private template:ArmTemplate; private graph:Graph; private loadUrl:string; //Url from the address bar private loadedUrl:string; toolboxItems:ToolboxResource[]; hideChrome = false; >>>>>>> private $scope: any; private $modal: any; private $http: any; //ng.IHttpProvider causes errors private template: ArmTemplate; private graph: Graph; private loadUrl: string; //Url from the address bar private loadedUrl: string; toolboxItems: ToolboxResource[]; hideChrome = false; <<<<<<< if ($stateParams.load) { ======= this.hideChrome = !!$stateParams.hideChrome; if($stateParams.load) { >>>>>>> this.hideChrome = !!$stateParams.hideChrome; if ($stateParams.load) { <<<<<<< }); } openPortalUIEditor() { this.$modal.open({ templateUrl: '/app/portalUIEditor/PortalUIEditorDialog.html', controller: 'PortalUIEditorController', controllerAs: 'main', size: 'lg' }); } toolboxItemClick(toolboxItem: ToolboxResource) { let jsonFileName = toolboxItem.getDefaultJsonFileName(); let resource: Resource; if (jsonFileName) { if (toolboxItem.defaultJson) { //Used the cached JSON and avoid a server trip resource = <Resource>JSON.parse(toolboxItem.defaultJson); //$http returns JSON as an object } else { //This is the first time getting this resource type this.$http.get('/assets/toolbox-data/' + jsonFileName) .success((data: any, status, headers, config) => { resource = <Resource>data; //$http returns JSON as an object toolboxItem.defaultJson = JSON.stringify(data); ======= }); } openPortalUIEditor() { this.$modal.open({ templateUrl: '/app/portalUIEditor/PortalUIEditorDialog.html', controller: 'PortalUIEditorController', controllerAs: 'main', size: 'lg' }); } toolboxItemClick(toolboxItem:ToolboxResource) { let jsonFileName = toolboxItem.getDefaultJsonFileName(); var resource:Resource; if(jsonFileName) { if(toolboxItem.defaultJson) { //Used the cached JSON and avoid a server trip resource = <Resource>JSON.parse(toolboxItem.defaultJson); //$http returns JSON as an object this.template.resources.push(resource); this.template.parseParametersFromTemplate(); return; } //This is the first time getting this resource type this.$http.get('/assets/toolbox-data/' + jsonFileName) .success((data:any, status, headers, config) => { resource = <Resource>data; //$http returns JSON as an object toolboxItem.defaultJson = JSON.stringify(data); this.template.resources.push(resource); this.template.parseParametersFromTemplate(); >>>>>>> }); } openPortalUIEditor() { this.$modal.open({ templateUrl: '/app/portalUIEditor/PortalUIEditorDialog.html', controller: 'PortalUIEditorController', controllerAs: 'main', size: 'lg' }); } toolboxItemClick(toolboxItem: ToolboxResource) { let jsonFileName = toolboxItem.getDefaultJsonFileName(); let resource: Resource; if (jsonFileName) { if (toolboxItem.defaultJson) { //Used the cached JSON and avoid a server trip resource = <Resource>JSON.parse(toolboxItem.defaultJson); //$http returns JSON as an object this.template.parseParametersFromTemplate(); } else { //This is the first time getting this resource type this.$http.get('/assets/toolbox-data/' + jsonFileName) .success((data: any, status, headers, config) => { resource = <Resource>data; //$http returns JSON as an object toolboxItem.defaultJson = JSON.stringify(data); this.template.parseParametersFromTemplate(); <<<<<<< //Fall back to using a primitive resource default JSON resource = new Resource(toolboxItem); ======= //Fall back to using a primitive resource default JSON resource = new Resource(toolboxItem); this.template.resources.push(resource); this.template.parseParametersFromTemplate(); >>>>>>> //Fall back to using a primitive resource default JSON resource = new Resource(toolboxItem); this.template.parseParametersFromTemplate(); <<<<<<< ======= } else { //No default JSON, use something really basic resource = new Resource(toolboxItem); this.template.resources.push(resource); this.template.parseParametersFromTemplate(); } } addShape(name:string) { if(name === 'group') { var shape = new Group(); this.graph.addInertShape(shape); shape.toBack(); >>>>>>>
<<<<<<< ['✅', '%s', styles.emoji], [parameters, '%o', 'padding-left: 4px;'], ======= ['done ✅', '%s', styles.emoji], [name, '%s', 'padding-left: 4px;'], [parameters, '(%o)', 'padding: 0;'], >>>>>>> ['✅', '%s', styles.emoji], [parameters, '(%o)', 'padding-left: 4px;'], <<<<<<< ['❌', '%s', styles.emoji], [parameters, '%o', 'padding-left: 4px;'], ======= ['fail ❌', '%s', styles.emoji], [name, '%s', 'padding-left: 4px;'], [parameters, '(%o)', 'padding: 0;'], >>>>>>> ['❌', '%s', styles.emoji], [parameters, '(%o)', 'padding-left: 4px;'],
<<<<<<< // compute the file offset for position var range = new vscode.Range(0, 0, position.line, position.character); var offset = document.getTextInRange(range).length; var gocode = getBinPath("gocode"); ======= var offset = document.offsetAt(position); var gocode = path.join(process.env["GOPATH"], "bin", "gocode"); >>>>>>> var offset = document.offsetAt(position); var gocode = getBinPath("gocode");
<<<<<<< import { setupGoPathAndOfferToInstallTools } from './goInstallTools'; import { GO_MODE } from './goMode'; import { showHideStatus } from './goStatus'; import { testAtCursor, testCurrentPackage, testCurrentFile } from './goTest'; import { addImport } from './goImport'; ======= import { setupGoPathAndOfferToInstallTools } from './goInstallTools' import { GO_MODE } from './goMode' import { showHideStatus } from './goStatus' import { coverageCurrentPackage, getCodeCoverage, removeCodeCoverage } from './goCover'; import { testAtCursor, testCurrentPackage, testCurrentFile } from './goTest' >>>>>>> import { setupGoPathAndOfferToInstallTools } from './goInstallTools'; import { GO_MODE } from './goMode'; import { showHideStatus } from './goStatus'; import { coverageCurrentPackage, getCodeCoverage, removeCodeCoverage } from './goCover'; import { testAtCursor, testCurrentPackage, testCurrentFile } from './goTest'; import { addImport } from './goImport'; <<<<<<< ctx.subscriptions.push(vscode.languages.registerSignatureHelpProvider(GO_MODE, new GoSignatureHelpProvider(), '(', ',')); ctx.subscriptions.push(vscode.languages.registerCodeActionsProvider(GO_MODE, new GoCodeActionProvider())); ======= >>>>>>> ctx.subscriptions.push(vscode.languages.registerSignatureHelpProvider(GO_MODE, new GoSignatureHelpProvider(), '(', ',')); ctx.subscriptions.push(vscode.languages.registerCodeActionsProvider(GO_MODE, new GoCodeActionProvider())); <<<<<<< ======= vscode.workspace.onDidChangeTextDocument(removeCodeCoverage, null, ctx.subscriptions); >>>>>>> vscode.workspace.onDidChangeTextDocument(removeCodeCoverage, null, ctx.subscriptions); <<<<<<< let uri = document.uri; check(uri.fsPath, goConfig).then(errors => { ======= var uri = document.uri; check(uri.fsPath, goConfig['buildOnSave'], goConfig['lintOnSave'], goConfig['vetOnSave'], goConfig['coverOnSave']).then(errors => { >>>>>>> let uri = document.uri; check(uri.fsPath, goConfig).then(errors => {
<<<<<<< type Options = readonly [ignore.IgnorePatternOptions]; ======= type Options = [ignore.IgnorePatternOption]; >>>>>>> type Options = readonly [ignore.IgnorePatternOption]; <<<<<<< const schema: JSONSchema4 = [ignore.ignorePatternOptionsSchema]; ======= const schema = [ignore.ignorePatternOptionSchema]; >>>>>>> const schema: JSONSchema4 = [ignore.ignorePatternOptionSchema];
<<<<<<< type Options = readonly [ ignore.IgnoreLocalOption & ignore.IgnorePatternOptions ]; ======= type Options = [ignore.IgnoreLocalOption & ignore.IgnorePatternOption]; >>>>>>> type Options = readonly [ignore.IgnoreLocalOption & ignore.IgnorePatternOption]; <<<<<<< const schema: JSONSchema4 = [ deepMerge([ignore.ignoreLocalOptionSchema, ignore.ignorePatternOptionsSchema]) ======= const schema = [ deepMerge([ignore.ignoreLocalOptionSchema, ignore.ignorePatternOptionSchema]) >>>>>>> const schema: JSONSchema4 = [ deepMerge([ignore.ignoreLocalOptionSchema, ignore.ignorePatternOptionSchema])
<<<<<<< refField?: string; snapshotListenOptions?: firestore.SnapshotListenOptions; ======= snapshotListenOptions?: firebase.firestore.SnapshotListenOptions; >>>>>>> refField?: string; snapshotListenOptions?: firebase.firestore.SnapshotListenOptions;
<<<<<<< import { auth, User } from 'firebase'; import { useEffect, useMemo } from 'react'; ======= import firebase from 'firebase/app'; import { useEffect } from 'react'; >>>>>>> import firebase from 'firebase/app'; import { useEffect, useMemo } from 'react';
<<<<<<< Similar to `transitionTo`, but instead of adding the destination to the browser's URL history, it replaces the entry for the current route. When the user clicks the "back" button in the browser, there will be fewer steps. This is most commonly used to manage redirects in a way that does not cause confusing additions to the user's browsing history. See [replaceWith](/api/ember/release/classes/Route/methods/replaceWith?anchor=replaceWith) for more info. ======= Transition into another route while replacing the current URL, if possible. The route may be either a single route or route path: See [replaceWith](/ember/release/classes/Route/methods/replaceWith?anchor=replaceWith) for more info. >>>>>>> Similar to `transitionTo`, but instead of adding the destination to the browser's URL history, it replaces the entry for the current route. When the user clicks the "back" button in the browser, there will be fewer steps. This is most commonly used to manage redirects in a way that does not cause confusing additions to the user's browsing history. See [replaceWith](/ember/release/classes/Route/methods/replaceWith?anchor=replaceWith) for more info.
<<<<<<< Invocation, NamedArguments, PositionalArguments, ======= >>>>>>> Invocation, NamedArguments, PositionalArguments, <<<<<<< export const CURLY_CAPABILITIES: ComponentCapabilities = { dynamicLayout: true, dynamicTag: true, prepareArgs: false, createArgs: true, attributeHook: true, elementHook: true }; const CURLY_COMPONENT_MANAGER = new CurlyComponentManager(); export class CurlyComponentDefinition implements ComponentDefinition { ======= const MANAGER = new CurlyComponentManager(); // This is not any of glimmer-vm's proper Argument types because we // don't have sufficient public constructors to conveniently // reassemble one after we mangle the various arguments. interface CurriedArgs { positional: any[]; named: any; } export class CurlyComponentDefinition extends ComponentDefinition<ComponentStateBucket> { >>>>>>> // This is not any of glimmer-vm's proper Argument types because we // don't have sufficient public constructors to conveniently // reassemble one after we mangle the various arguments. interface CurriedArgs { positional: any[]; named: any; } export const CURLY_CAPABILITIES: ComponentCapabilities = { dynamicLayout: true, dynamicTag: true, prepareArgs: false, createArgs: true, attributeHook: true, elementHook: true }; const CURLY_COMPONENT_MANAGER = new CurlyComponentManager(); export class CurlyComponentDefinition implements ComponentDefinition { <<<<<<< public args: Arguments | undefined; public state: DefinitionState; public symbolTable: ProgramSymbolTable | undefined; ======= public args: CurriedArgs | undefined; >>>>>>> public args: CurriedArgs | undefined; public state: DefinitionState; public symbolTable: ProgramSymbolTable | undefined; <<<<<<< constructor(public name: string, public manager: CurlyComponentManager = CURLY_COMPONENT_MANAGER, public ComponentClass: any, public handle: Option<VMHandle>, template: OwnedTemplate, args?: Arguments) { const layout = template && template.asLayout(); const symbolTable = layout ? layout.symbolTable : undefined; this.symbolTable = symbolTable; ======= constructor(name: string, ComponentClass: ComponentClass, template: OwnedTemplate, args: CurriedArgs | undefined, customManager?: ComponentManager<ComponentStateBucket>) { super(name, customManager || MANAGER, ComponentClass); >>>>>>> constructor(public name: string, public manager: CurlyComponentManager = CURLY_COMPONENT_MANAGER, public ComponentClass: any, public handle: Option<VMHandle>, template: OwnedTemplate, args?: CurriedArgs) { const layout = template && template.asLayout(); const symbolTable = layout ? layout.symbolTable : undefined; this.symbolTable = symbolTable;
<<<<<<< import { CompilableBlock, Macros, OpcodeBuilder } from '@glimmer/opcode-compiler'; import { Option } from '@glimmer/util'; import { Core } from '@glimmer/wire-format'; import { OwnedTemplateMeta } from 'ember-views'; ======= import { assert } from 'ember-debug'; import { ENV } from 'ember-environment'; >>>>>>> import { CompilableBlock, Macros, OpcodeBuilder } from '@glimmer/opcode-compiler'; import { Option } from '@glimmer/util'; import { Core } from '@glimmer/wire-format'; import { ENV } from 'ember-environment'; import { OwnedTemplateMeta } from 'ember-views'; <<<<<<< // inlines.add('component', inlineComponentMacro); inlines.add('render', renderMacro); ======= inlines.add('component', inlineComponentMacro); if (ENV._ENABLE_RENDER_SUPPORT === true) { inlines.add('render', renderMacro); } >>>>>>> if (ENV._ENABLE_RENDER_SUPPORT === true) { inlines.add('render', renderMacro); }
<<<<<<< ======= const DEBUG = true; >>>>>>> <<<<<<< ======= // EAVNs //------------------------------------------------------------------------ export type EAVNField = "e"|"a"|"v"|"n"; /** * An EAVN is a single Attribute:Value pair of an Entity (a record), * produced by a given Node. * E.g., the record `[#person name: "josh"]` translates to two EAVNs: * (<1>, "tag", "person", <node id>), * (<1>, "name", "josh", <node id>) */ export class EAVN { constructor(public e:ID, public a:ID, public v:ID, public n:ID) {} }; type EAV = [ID, ID, ID]; export type RawEAV = [RawValue, RawValue, RawValue]; export type RawEAVC = [RawValue, RawValue, RawValue, number]; //------------------------------------------------------------------------ >>>>>>> <<<<<<< ======= makeFunction({ name: "compare/>", args: {a: "number", b: "number"}, returns: {}, apply: (a:number, b:number) => { return (a > b) ? [] : undefined; } }); makeFunction({ name: "compare/==", args: {a: "number", b: "number"}, returns: {}, apply: (a:number, b:number) => { return (a === b) ? [] : undefined; } }); makeFunction({ name: "math/+", args: {a: "number", b: "number"}, returns: {result: "number"}, apply: (a:number, b:number) => { return [a + b]; } }); makeFunction({ name: "eve/internal/gen-id", args: {}, variadic: true, returns: {result: "string"}, apply: (values:RawValue[]) => { // @FIXME: This is going to be busted in subtle cases. // If a record exists with a "1" and 1 value for the same // attribute, they'll collapse for gen-id, but won't join // elsewhere. This means aggregate cardinality will disagree with // action node cardinality. return [values.join("|")]; } }); makeFunction({ name: "eve/internal/concat", args: {}, variadic: true, returns: {result: "string"}, apply: (values:RawValue[]) => { return [values.join("")]; } }); //------------------------------------------------------------------------ // Proposal //------------------------------------------------------------------------ export interface Proposal { cardinality:number, forFields:Iterator<EAVNField>, forRegisters:Iterator<Register>, proposer:Constraint, skip?:boolean, info?:any, } //------------------------------------------------------------------------ // Registers //------------------------------------------------------------------------ /** * A register is just a numerical offset into the solved prefix. * We can't make this a type alias because we wouldn't be able to * tell the difference between static numbers and registers in scans. */ export class Register { constructor(public offset:number) {} } export function isRegister(x: any): x is Register { return x && x.constructor === Register; } /** The ignore register is a sentinel value for ScanFields that tell the scan to completely ignore that field. */ export var IGNORE_REG = null; type IgnoreRegister = typeof IGNORE_REG; /** A scan field may contain a register, a static interned value, or the IGNORE_REG sentinel value. */ export type ScanField = Register|ID|IgnoreRegister; /** A resolved value is a scan field that, if it contained a register, now contains the register's resolved value. */ export type ResolvedValue = ID|undefined|IgnoreRegister; type ResolvedEAVN = {e:ResolvedValue, a:ResolvedValue, v:ResolvedValue, n:ResolvedValue}; >>>>>>> <<<<<<< applyCombination(index:Index, input:Change, prefix:Prefix, transaction:number, round:number, results:Iterator<ID[]>) { debug(" Join combo:", prefix.slice()); ======= applyCombination(index:Index, input:Change, prefix:ID[], transaction:number, round:number, results:Iterator<ID[]>) { debug(" Join combo:", prefix.slice()); >>>>>>> applyCombination(index:Index, input:Change, prefix:Prefix, transaction:number, round:number, results:Iterator<Prefix>) { debug(" Join combo:", prefix.slice()); <<<<<<< exec(index:Index, input:Change, prefix:Prefix, transactionId:number, round:number, results:Iterator<ID[]>, transaction:Transaction):boolean { let resolved = this.resolve(prefix); let {e,a,v,n} = resolved; ======= debug(` ?? <- [${GlobalInterner.reverse(e)}, ${GlobalInterner.reverse(a)}, ${GlobalInterner.reverse(v)}] round: ${roundIx} | ${curCount} + ${roundCount} = ${nextCount} | ∂: ${delta}`); >>>>>>> debug(` ?? <- [${GlobalInterner.reverse(e)}, ${GlobalInterner.reverse(a)}, ${GlobalInterner.reverse(v)}] round: ${roundIx} | ${curCount} + ${roundCount} = ${nextCount} | ∂: ${delta}`);
<<<<<<< // EMBER_GLIMMER_TEMPLATE_ONLY_COMPONENTS, // GLIMMER_CUSTOM_COMPONENT_MANAGER, ======= GLIMMER_CUSTOM_COMPONENT_MANAGER, >>>>>>> // GLIMMER_CUSTOM_COMPONENT_MANAGER, <<<<<<< // this._definitionCache = new Cache(2000, ({ name, source, owner }) => { // let { component: componentFactory, layout } = lookupComponent(owner, name, { source }); // let customManager: any; // if (EMBER_GLIMMER_TEMPLATE_ONLY_COMPONENTS && layout && !componentFactory) { // return new TemplateOnlyComponentDefinition(name, layout); // } else if (componentFactory || layout) { // if (GLIMMER_CUSTOM_COMPONENT_MANAGER) { // let managerId = layout && layout.meta.managerId; // if (managerId) { // customManager = owner.factoryFor<any>(`component-manager:${managerId}`).class; // } // } // return new CurlyComponentDefinition(name, componentFactory, layout, undefined, customManager); // } // return undefined; // }, ({ name, source, owner }) => { // let expandedName = source && this._resolveLocalLookupName(name, source, owner) || name; // let ownerGuid = guidFor(owner); // return ownerGuid + '|' + expandedName; // }); // this._templateCache = new Cache(1000, ({ Template, owner }) => { // if (isTemplateFactory(Template)) { // // we received a factory // return Template.create({ env: this, [OWNER]: owner }); // } else { // // we were provided an instance already // return Template; // } // }, ({ Template, owner }) => guidFor(owner) + '|' + Template.id); // this._compilerCache = new Cache(10, (Compiler) => { // return new Cache(2000, (template) => { // let compilable = new Compiler(template); // return compileLayout(compilable, this); // }, (template) => { // let owner = template.meta.owner; // return guidFor(owner) + '|' + template.id; // }); // }, (Compiler) => Compiler.id); // this.builtInModifiers = { // action: new ActionModifierManager(), // }; // this.builtInHelpers = { // 'if': inlineIf, // action, // concat, // get, // hash, // log, // mut, // 'query-params': queryParams, // readonly, // unbound, // 'unless': inlineUnless, // '-class': classHelper, // '-each-in': eachIn, // '-input-type': inputTypeHelper, // '-normalize-class': normalizeClassHelper, // '-html-safe': htmlSafeHelper, // '-get-dynamic-var': getDynamicVar, // }; ======= this._definitionCache = new Cache(2000, ({ name, source, owner }) => { let { component: componentFactory, layout } = lookupComponent(owner, name, { source }); let customManager: any; if (ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS && layout && !componentFactory) { return new TemplateOnlyComponentDefinition(name, layout); } else if (componentFactory || layout) { if (GLIMMER_CUSTOM_COMPONENT_MANAGER) { let managerId = layout && layout.meta.managerId; if (managerId) { customManager = owner.factoryFor<any>(`component-manager:${managerId}`).class; } } return new CurlyComponentDefinition(name, componentFactory, layout, undefined, customManager); } return undefined; }, ({ name, source, owner }) => { let expandedName = source && this._resolveLocalLookupName(name, source, owner) || name; let ownerGuid = guidFor(owner); return ownerGuid + '|' + expandedName; }); this._templateCache = new Cache(1000, ({ Template, owner }) => { if (isTemplateFactory(Template)) { // we received a factory return Template.create({ env: this, [OWNER]: owner }); } else { // we were provided an instance already return Template; } }, ({ Template, owner }) => guidFor(owner) + '|' + Template.id); this._compilerCache = new Cache(10, (Compiler) => { return new Cache(2000, (template) => { let compilable = new Compiler(template); return compileLayout(compilable, this); }, (template) => { let owner = template.meta.owner; return guidFor(owner) + '|' + template.id; }); }, (Compiler) => Compiler.id); this.builtInModifiers = { action: new ActionModifierManager(), }; this.builtInHelpers = { 'if': inlineIf, action, concat, get, hash, log, mut, 'query-params': queryParams, readonly, unbound, 'unless': inlineUnless, '-class': classHelper, '-each-in': eachIn, '-input-type': inputTypeHelper, '-normalize-class': normalizeClassHelper, '-html-safe': htmlSafeHelper, '-get-dynamic-var': getDynamicVar, }; >>>>>>> // this._definitionCache = new Cache(2000, ({ name, source, owner }) => { // let { component: componentFactory, layout } = lookupComponent(owner, name, { source }); // let customManager: any; // if (ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS && layout && !componentFactory) { // return new TemplateOnlyComponentDefinition(name, layout); // } else if (componentFactory || layout) { // if (GLIMMER_CUSTOM_COMPONENT_MANAGER) { // let managerId = layout && layout.meta.managerId; // if (managerId) { // customManager = owner.factoryFor<any>(`component-manager:${managerId}`).class; // } // } // return new CurlyComponentDefinition(name, componentFactory, layout, undefined, customManager); // } // return undefined; // }, ({ name, source, owner }) => { // let expandedName = source && this._resolveLocalLookupName(name, source, owner) || name; // let ownerGuid = guidFor(owner); // return ownerGuid + '|' + expandedName; // }); // this._templateCache = new Cache(1000, ({ Template, owner }) => { // if (isTemplateFactory(Template)) { // // we received a factory // return Template.create({ env: this, [OWNER]: owner }); // } else { // // we were provided an instance already // return Template; // } // }, ({ Template, owner }) => guidFor(owner) + '|' + Template.id); // this._compilerCache = new Cache(10, (Compiler) => { // return new Cache(2000, (template) => { // let compilable = new Compiler(template); // return compileLayout(compilable, this); // }, (template) => { // let owner = template.meta.owner; // return guidFor(owner) + '|' + template.id; // }); // }, (Compiler) => Compiler.id); // this.builtInModifiers = { // action: new ActionModifierManager(), // }; // this.builtInHelpers = { // 'if': inlineIf, // action, // concat, // get, // hash, // log, // mut, // 'query-params': queryParams, // readonly, // unbound, // 'unless': inlineUnless, // '-class': classHelper, // '-each-in': eachIn, // '-input-type': inputTypeHelper, // '-normalize-class': normalizeClassHelper, // '-html-safe': htmlSafeHelper, // '-get-dynamic-var': getDynamicVar, // };
<<<<<<< ======= Cookies, FabPluginRuntime, >>>>>>> <<<<<<< FABServerContext, RuntimeImports, ======= >>>>>>> RuntimeImports,
<<<<<<< Directive, ======= FabResponderMutableContext, >>>>>>> Directive, FabResponderMutableContext, <<<<<<< [ ...(runtimes as RuntimeImports), { plugin: final_responder, args: {}, }, ], ======= [...runtimes, final_responder], >>>>>>> [ ...(runtimes as RuntimeImports), { plugin: final_responder, args: {}, }, ],
<<<<<<< context.tracker.blockTimeEnd("PresolveCheck"); debug(" Join combo valid:", valid, remainingToSolve, countOfSolved, this.registerLength); ======= //debug(" Join combo valid:", valid, remainingToSolve, countOfSolved, this.registerLength); >>>>>>> //debug(" Join combo valid:", valid, remainingToSolve, countOfSolved, this.registerLength); <<<<<<< debug(" GJ -> ", result); ======= context.tracer.capturePrefix(result); //debug(" GJ -> ", result); >>>>>>> context.tracer.capturePrefix(result); //debug(" GJ -> ", result); <<<<<<< debug(" antijoin:") ======= // debug(" antijoin:") >>>>>>> // debug(" antijoin:") <<<<<<< debug(" left:", key, count, this.rightIndex.index[key] && copyArray(this.rightIndex.index[key]), prefix); ======= // debug(" left:", key, count, this.rightIndex.index[key] && copyArray(this.rightIndex.index[key]), prefix); >>>>>>> // debug(" left:", key, count, this.rightIndex.index[key] && copyArray(this.rightIndex.index[key]), prefix); <<<<<<< debug(" left ->", key, count, diffs) ======= // debug(" left ->", key, count, diffs) >>>>>>> // debug(" left ->", key, count, diffs) <<<<<<< debug(" left ->", key, count, currentRound, result[result.length - 1]) ======= // debug(" left ->", key, count, currentRound, result[result.length - 1]) >>>>>>> // debug(" left ->", key, count, currentRound, result[result.length - 1]) <<<<<<< debug(" right:", key, count, this.leftIndex.index[key] && copy(this.leftIndex.index[key])); debug(" right distinct: ", this.distinct.index[key], neue); ======= // debug(" right:", key, count, this.leftIndex.index[key] && copy(this.leftIndex.index[key])); // debug(" right distinct: ", this.distinct.index[key], neue); >>>>>>> // debug(" right:", key, count, this.leftIndex.index[key] && copy(this.leftIndex.index[key])); // debug(" right distinct: ", this.distinct.index[key], neue); <<<<<<< diffs = this.leftIndex.iter(key, prefixRound)!; ======= diffs = this.leftIndex.iter(key, prefixRound)! >>>>>>> diffs = this.leftIndex.iter(key, prefixRound)!; <<<<<<< debug(" right ->", key, maxRound, rightCount, diffs.count, result[result.length - 1]) ======= // debug(" right ->", key, maxRound, rightCount, diffs.count, result[result.length - 1]) >>>>>>> // debug(" right ->", key, maxRound, rightCount, diffs.count, result[result.length - 1]) <<<<<<< leftResults.reset(); console.log("CALLING BRANCH EMPTY") ======= tracer.node(node, prefix); >>>>>>> leftResults.reset(); tracer.node(node, prefix); <<<<<<< leftResults.reset(); let leftPrefix; while((leftPrefix = leftResults.next()) !== undefined) { console.log("CALLING BRANCH PREFIX", leftPrefix.slice()); node.exec(context, input, copyArray(leftPrefix, "ChooseLeftPrefixCopy"), transaction, round, branchResult, changes); } ======= tracer.pop(TraceFrameType.Node); >>>>>>> tracer.pop(TraceFrameType.Node); leftResults.reset(); let leftPrefix; while((leftPrefix = leftResults.next()) !== undefined) { tracer.node(node, prefix); node.exec(context, input, copyArray(leftPrefix, "ChooseLeftPrefixCopy"), transaction, round, branchResult, changes); tracer.pop(TraceFrameType.Node); } <<<<<<< debug(" E~", change.toString(), context.tracker.activeBlock); ======= // debug(" E~", change.toString(), context.tracker.activeBlock); >>>>>>> // debug(" E~", change.toString(), context.tracker.activeBlock); <<<<<<< debug(" <-", output.toString()) ======= tracer.output(output); // debug(" <-", output.toString()) >>>>>>> tracer.output(output); // debug(" <-", output.toString()) <<<<<<< tracker.block(block.name); debug(" ", block.name); ======= tracer.block(block.name); //debug(" ", block.name); >>>>>>> tracer.block(block.name); //debug(" ", block.name);
<<<<<<< export { ViewWidth, ViewHeight, SizeType } from './components/AdaptivityProvider/AdaptivityContext'; export const v = process.env.VKUI_VERSION; ======= export { ViewWidth, SizeType } from './components/AdaptivityProvider/AdaptivityContext'; >>>>>>> export { ViewWidth, ViewHeight, SizeType } from './components/AdaptivityProvider/AdaptivityContext';
<<<<<<< } export function setRef<T>(element: T, ref: Ref<T>): void { if (ref) { if (typeof ref === 'function') { ref(element); } else { ref.current = element; } } } // eslint-disable-next-line export const noop = () => {}; export function createCustomEvent(window: any, type: string, eventInitDict?: any) { if (typeof window.CustomEvent !== 'function') { const options = eventInitDict || { bubbles: false, cancelable: false, detail: null }; const evt = document.createEvent('CustomEvent'); evt.initCustomEvent( type, options.bubbles, options.cancelable, options.detail, ); return evt; } return new window.CustomEvent(type, eventInitDict); }; export function getTitleFromChildren(children: ReactNode): string { let label = ''; Children.map(children, (child) => { if (typeof child === 'string') { label += child; } }); return label; ======= } export function isPrimitiveReactNode(node: ReactNode): boolean { return typeof node === 'string' || typeof node === 'number'; >>>>>>> } export function isPrimitiveReactNode(node: ReactNode): boolean { return typeof node === 'string' || typeof node === 'number'; } export function setRef<T>(element: T, ref: Ref<T>): void { if (ref) { if (typeof ref === 'function') { ref(element); } else { ref.current = element; } } } // eslint-disable-next-line export const noop = () => {}; export function createCustomEvent(window: any, type: string, eventInitDict?: any) { if (typeof window.CustomEvent !== 'function') { const options = eventInitDict || { bubbles: false, cancelable: false, detail: null }; const evt = document.createEvent('CustomEvent'); evt.initCustomEvent( type, options.bubbles, options.cancelable, options.detail, ); return evt; } return new window.CustomEvent(type, eventInitDict); }; export function getTitleFromChildren(children: ReactNode): string { let label = ''; Children.map(children, (child) => { if (typeof child === 'string') { label += child; } }); return label;
<<<<<<< case AppMode.Date: return getDateState(); ======= case AppMode.FixedTooltips: return getFixedTooltipsState(); >>>>>>> case AppMode.Date: return getDateState(); case AppMode.FixedTooltips: return getFixedTooltipsState();
<<<<<<< const metaExports: StylableExports = { classes: {}, vars: {}, stVars: {}, keyframes: {} }; const ast = meta.outputAst = meta.ast.clone(); ======= const metaExports: Pojo<string> = {}; const ast = this.resetTransformProperties(meta); >>>>>>> const metaExports: StylableExports = { classes: {}, vars: {}, stVars: {}, keyframes: {} }; const ast = this.resetTransformProperties(meta); <<<<<<< public createCSSVarsMapping(_ast: postcss.Root, meta: StylableMeta) { const cssVarsMapping: Pojo<string> = {}; // imported vars for (const imported of meta.imports) { for (const symbolName of Object.keys(imported.named)) { if (isCSSVarProp(symbolName)) { const importedVar = this.resolver.deepResolve(meta.mappedSymbols[symbolName]); if (importedVar && importedVar._kind === 'css' && importedVar.symbol && importedVar.symbol._kind === 'cssVar') { cssVarsMapping[symbolName] = importedVar.symbol.global ? symbolName : generateScopedCSSVar(importedVar.meta.namespace, symbolName.slice(2)); } } } } // locally defined vars for (const localVarName of Object.keys(meta.cssVars)) { const cssVar = meta.cssVars[localVarName]; cssVarsMapping[localVarName] = cssVar.global ? localVarName : generateScopedCSSVar(meta.namespace, localVarName.slice(2)); } return cssVarsMapping; } public getScopedCSSVar( decl: postcss.Declaration, meta: StylableMeta, cssVarsMapping: Pojo<string>) { let prop = decl.prop; if (meta.cssVars[prop]) { prop = cssVarsMapping[prop]; } return prop; } public transformGlobals(ast: postcss.Root) { ======= public addGlobalsToMeta(selectorAst: SelectorAstNode[], meta?: StylableMeta) { if (!meta) { return; } for (const ast of selectorAst) { traverseNode(ast, inner => { if (inner.type === 'class') { meta.globals[inner.name] = true; } }); } } public transformGlobals(ast: postcss.Root, meta: StylableMeta) { >>>>>>> public createCSSVarsMapping(_ast: postcss.Root, meta: StylableMeta) { const cssVarsMapping: Pojo<string> = {}; // imported vars for (const imported of meta.imports) { for (const symbolName of Object.keys(imported.named)) { if (isCSSVarProp(symbolName)) { const importedVar = this.resolver.deepResolve(meta.mappedSymbols[symbolName]); if (importedVar && importedVar._kind === 'css' && importedVar.symbol && importedVar.symbol._kind === 'cssVar') { cssVarsMapping[symbolName] = importedVar.symbol.global ? symbolName : generateScopedCSSVar(importedVar.meta.namespace, symbolName.slice(2)); } } } } // locally defined vars for (const localVarName of Object.keys(meta.cssVars)) { const cssVar = meta.cssVars[localVarName]; cssVarsMapping[localVarName] = cssVar.global ? localVarName : generateScopedCSSVar(meta.namespace, localVarName.slice(2)); } return cssVarsMapping; } public getScopedCSSVar( decl: postcss.Declaration, meta: StylableMeta, cssVarsMapping: Pojo<string>) { let prop = decl.prop; if (meta.cssVars[prop]) { prop = cssVarsMapping[prop]; } return prop; } public addGlobalsToMeta(selectorAst: SelectorAstNode[], meta?: StylableMeta) { if (!meta) { return; } for (const ast of selectorAst) { traverseNode(ast, inner => { if (inner.type === 'class') { meta.globals[inner.name] = true; } }); } } public transformGlobals(ast: postcss.Root, meta: StylableMeta) { <<<<<<< const next = this.handleClass(current, node, name, classesExport, rule); ======= const next = this.handleClass(current, node, name, metaExports, rule, originMeta); >>>>>>> const next = this.handleClass(current, node, name, classesExport, rule, originMeta); <<<<<<< classesExport?: Pojo<string>, rule?: postcss.Rule): CSSResolve { ======= metaExports?: Pojo<string>, rule?: postcss.Rule, originMeta?: StylableMeta): CSSResolve { >>>>>>> classesExport?: Pojo<string>, rule?: postcss.Rule, originMeta?: StylableMeta): CSSResolve {
<<<<<<< ======= import { generateStylableResult, generateStylableRoot } from '../utils/generate-test-util'; >>>>>>>
<<<<<<< // private _cssLanguageService?: LanguageService; ======= public updateCached( context: TemplateContext, position: ts.LineAndCharacter, completions: vscode.CompletionList ) { this._cachedCompletionsFile = context.fileName; this._cachedCompletionsPosition = position; this._cachedCompletionsContent = context.text; this._completions = completions; } } export default class StyledTemplateLanguageService implements TemplateLanguageService { private _cssLanguageService?: LanguageService; >>>>>>> public updateCached( context: TemplateContext, position: ts.LineAndCharacter, completions: vscode.CompletionList ) { this._cachedCompletionsFile = context.fileName; this._cachedCompletionsPosition = position; this._cachedCompletionsContent = context.text; this._completions = completions; } } export default class StyledTemplateLanguageService implements TemplateLanguageService { private _cssLanguageService?: LanguageService; <<<<<<< const doc = this.createVirtualDocument(context); const stylesheet = this.scssLanguageService.parseStylesheet(doc); const items = this.scssLanguageService.doComplete(doc, this.toVirtualDocPosition(position), stylesheet); items.items = filterCompletionItems(items.items); return translateCompletionItems(this.typescript, items); ======= const items = this.getCompletionItems(context, position); return translateCompletionItemsToCompletionInfo(this.typescript, items); } public getCompletionEntryDetails?( context: TemplateContext, position: ts.LineAndCharacter, name: string ): ts.CompletionEntryDetails { const item = this.getCompletionItems(context, position).items.find(x => x.label === name); if (!item) { return { name, kind: this.typescript.ScriptElementKind.unknown, kindModifiers: '', tags: [], displayParts: toDisplayParts(name), documentation: [], }; } return translateCompletionItemsToCompletionEntryDetails(this.typescript, item); >>>>>>> const items = this.getCompletionItems(context, position); items.items = filterCompletionItems(items.items); return translateCompletionItemsToCompletionInfo(this.typescript, items); } public getCompletionEntryDetails?( context: TemplateContext, position: ts.LineAndCharacter, name: string ): ts.CompletionEntryDetails { const item = this.getCompletionItems(context, position).items.find(x => x.label === name); if (!item) { return { name, kind: this.typescript.ScriptElementKind.unknown, kindModifiers: '', tags: [], displayParts: toDisplayParts(name), documentation: [], }; } return translateCompletionItemsToCompletionEntryDetails(this.typescript, item); <<<<<<< function filterCompletionItems( items: CompletionItem[] ): CompletionItem[] { return items.filter(item => { if ( item.kind === vscode.CompletionItemKind.Property || item.kind === vscode.CompletionItemKind.Unit || item.kind === vscode.CompletionItemKind.Value || item.kind === vscode.CompletionItemKind.Keyword || item.kind === vscode.CompletionItemKind.Snippet || item.kind === vscode.CompletionItemKind.File || item.kind === vscode.CompletionItemKind.Color || !item.kind ) { return true; } else if ( item.kind === vscode.CompletionItemKind.Function && item.label.substr(0, 1) === ':' ) { return true; } else { return false; } }); } function translateCompletionItems( ======= function translateCompletionItemsToCompletionInfo( >>>>>>> function filterCompletionItems( items: CompletionItem[] ): CompletionItem[] { return items.filter(item => { if ( item.kind === vscode.CompletionItemKind.Property || item.kind === vscode.CompletionItemKind.Unit || item.kind === vscode.CompletionItemKind.Value || item.kind === vscode.CompletionItemKind.Keyword || item.kind === vscode.CompletionItemKind.Snippet || item.kind === vscode.CompletionItemKind.File || item.kind === vscode.CompletionItemKind.Color || !item.kind ) { return true; } else if ( item.kind === vscode.CompletionItemKind.Function && item.label.substr(0, 1) === ':' ) { return true; } else { return false; } }); } function translateCompletionItemsToCompletionInfo(
<<<<<<< import {ProjectTemplate, ProjectTemplateType} from './Models/Interfaces/ProjectTemplate'; ======= import * as fs from 'fs-plus'; >>>>>>> <<<<<<< const result: ProjectTemplate = templateJson.templates.find((template: ProjectTemplate) => { return template.label === selection.label; }); if (!result) { throw new Error('Unable to load project template.'); } ======= // Step 5: Load the list of template files const projectTemplateType: ProjectTemplateType = (ProjectTemplateType) [template.type as keyof typeof ProjectTemplateType]; >>>>>>> // Step 5: Load the list of template files const projectTemplateType: ProjectTemplateType = (ProjectTemplateType) [template.type as keyof typeof ProjectTemplateType]; <<<<<<< const project = new ioTProjectModule.IoTProject( context, channel, telemetryContext); const sketchTemplateFilePath = context.asAbsolutePath(path.join( FileNames.resourcesFolderName, boardSelection.id, result.sketch)); const content = fs.readFileSync(sketchTemplateFilePath, 'utf8'); // Convert the string based template type to enum. const type: ProjectTemplateType = ProjectTemplateType [result.type as keyof typeof ProjectTemplateType]; ======= >>>>>>> <<<<<<< rootPath, content, type, boardSelection.id, openInNewWindow); ======= projectPath, templateFilesInfo, projectTemplateType, template.boardId, openInNewWindow); >>>>>>> projectPath, templateFilesInfo, projectTemplateType, template.boardId, openInNewWindow);
<<<<<<< ======= private templateFiles: TemplateFileInfo[] = []; >>>>>>> private templateFiles: TemplateFileInfo[] = []; <<<<<<< devicePath: string, private sketchContent = '') { ======= devicePath: string, templateFiles?: TemplateFileInfo[]) { >>>>>>> devicePath: string, templateFiles?: TemplateFileInfo[]) { <<<<<<< ======= if (templateFiles) { this.templateFiles = templateFiles; } >>>>>>> if (templateFiles) { this.templateFiles = templateFiles; } <<<<<<< if (!this.sketchContent) { throw new Error('The content of the sketch file is empty.'); } const deviceFolderPath = this.deviceFolder; if (!fs.existsSync(deviceFolderPath)) { throw new Error('Unable to find the device folder inside the project.'); } if (!this.board) { throw new Error('Unable to find the board in the config file.'); } this.generateCommonFiles(); this.generateCppPropertiesFile(this.board); await this.generateSketchFile( this.sketchContent, this.board, constants.boardInfo, constants.uploadMethod); return true; ======= return this.createCore(this.board, this.templateFiles); >>>>>>> return this.createCore(this.board, this.templateFiles);
<<<<<<< device = new AZ3166Device(this.extensionContext, deviceDir, sketchContent); ======= device = new AZ3166Device( this.extensionContext, this.channel, deviceDir, projectTemplateItem.sketch); >>>>>>> device = new AZ3166Device( this.extensionContext, this.channel, deviceDir, sketchContent); <<<<<<< device = new Esp32Device(this.extensionContext, deviceDir, sketchContent); ======= device = new Esp32Device( this.extensionContext, this.channel, deviceDir, projectTemplateItem.sketch); >>>>>>> device = new Esp32Device( this.extensionContext, this.channel, deviceDir, sketchContent);
<<<<<<< context: vscode.ExtensionContext, devicePath: string, channel: vscode.OutputChannel, private sketchContent = '') { ======= context: vscode.ExtensionContext, projectPath: string, channel: vscode.OutputChannel, projectTemplateType: ProjectTemplateType, telemetryContext: TelemetryContext, private templateFilesInfo: TemplateFileInfo[] = []) { >>>>>>> context: vscode.ExtensionContext, projectPath: string, channel: vscode.OutputChannel, projectTemplateType: ProjectTemplateType, telemetryContext: TelemetryContext, private templateFilesInfo: TemplateFileInfo[] = []) { <<<<<<< ======= this.extensionContext = context; this.projectFolder = projectPath; this.outputPath = path.join(this.projectFolder, FileNames.outputPathName); this.telemetryContext = telemetryContext; >>>>>>> this.extensionContext = context; this.projectFolder = projectPath; this.outputPath = path.join(this.projectFolder, FileNames.outputPathName); this.telemetryContext = telemetryContext; <<<<<<< const newSketchFilePath = path.join(deviceFolderPath, sketchFileName); try { fs.writeFileSync(newSketchFilePath, this.sketchContent); } catch (error) { throw new Error(`Create ${sketchFileName} failed: ${error.message}`); ======= // load project config const configPath = path.join( this.projectFolder, FileNames.vscodeSettingsFolderName, constants.configFile); if (!await FileUtility.fileExists(ScaffoldType.Workspace, configPath)) { const message = `Config file does not exist. Please check your settings.`; await vscode.window.showWarningMessage(message); return false; >>>>>>> // load project config const configPath = path.join( this.projectFolder, FileNames.vscodeSettingsFolderName, constants.configFile); if (!await FileUtility.fileExists(ScaffoldType.Workspace, configPath)) { const message = `Config file does not exist. Please check your settings.`; await vscode.window.showWarningMessage(message); return false;
<<<<<<< } export function generateInterfaceFileNameFromUrnId( urnId: string, targetPath: string) { const suffix = '.interface.json'; const names: string[] = urnId.split(':'); // at least the path should contain urn, namespace, name & version if (names.length < 4) { throw new Error(`The id of the file is not valid. id: ${urnId}`); } const displayName = names.join('_'); let counter = 0; let candidateName = displayName + suffix; while (true) { const filePath = path.join(targetPath, candidateName); if (!fileExistsSync(filePath)) { break; } counter++; candidateName = `${displayName}_${counter}${suffix}`; } return candidateName; ======= } export class InternalConfig { static isInternal: boolean = InternalConfig.isInternalUser(); private static isInternalUser(): boolean { const userDomain = process.env.USERDNSDOMAIN ? process.env.USERDNSDOMAIN.toLowerCase() : ''; return userDomain.endsWith('microsoft.com'); } } export function runCommand( command: string, workingDir: string, outputChannel: vscode.OutputChannel): Thenable<object> { return new Promise((resolve, reject) => { const stdout = ''; const stderr = ''; const process = cp.spawn(command, [], {cwd: workingDir, shell: true}); process.stdout.on('data', (data: string) => { outputChannel.appendLine(data); }); process.stderr.on('data', (data: string) => { outputChannel.appendLine(data); }); process.on('error', (error) => reject({error, stderr, stdout})); process.on('close', (status) => { if (status === 0) { resolve({status, stdout, stderr}); } else { reject({status, stdout, stderr}); } }); }); } export async function generateTemplateFile( root: string, type: ScaffoldType, fileInfo: TemplateFileInfo): Promise<boolean> { const targetFolderPath = path.join(root, fileInfo.targetPath); if (!await FileUtility.directoryExists(type, targetFolderPath)) { await FileUtility.mkdirRecursively(type, targetFolderPath); } const targetFilePath = path.join(targetFolderPath, fileInfo.fileName); if (fileInfo.fileContent) { try { await FileUtility.writeFile(type, targetFilePath, fileInfo.fileContent); } catch (error) { throw new Error(`Failed to create sketch file ${fileInfo.fileName}: ${ error.message}`); } } return true; } /** * If current folder is an IoT Workspace Project but not open correctly, ask * and open the IoT Workspace Project. Otherwise ask and New IoT Project. */ export async function handleIoTWorkspaceProjectFolder( telemetryContext: TelemetryContext): Promise<boolean> { if (!vscode.workspace.workspaceFolders || !vscode.workspace.workspaceFolders[0]) { return false; } const rootPath = vscode.workspace.workspaceFolders[0].uri.fsPath; const workbenchFileName = path.join(rootPath, 'Device', FileNames.iotworkbenchprojectFileName); const workspaceFiles = fs.readdirSync(rootPath).filter( file => path.extname(file).endsWith(FileNames.workspaceExtensionName)); if (fs.existsSync(workbenchFileName) && workspaceFiles && workspaceFiles[0]) { await askAndOpenProject(rootPath, workspaceFiles[0], telemetryContext); return true; } await askAndNewProject(telemetryContext); return true; >>>>>>> } export function generateInterfaceFileNameFromUrnId( urnId: string, targetPath: string) { const suffix = '.interface.json'; const names: string[] = urnId.split(':'); // at least the path should contain urn, namespace, name & version if (names.length < 4) { throw new Error(`The id of the file is not valid. id: ${urnId}`); } const displayName = names.join('_'); let counter = 0; let candidateName = displayName + suffix; while (true) { const filePath = path.join(targetPath, candidateName); if (!fileExistsSync(filePath)) { break; } counter++; candidateName = `${displayName}_${counter}${suffix}`; } return candidateName; } export class InternalConfig { static isInternal: boolean = InternalConfig.isInternalUser(); private static isInternalUser(): boolean { const userDomain = process.env.USERDNSDOMAIN ? process.env.USERDNSDOMAIN.toLowerCase() : ''; return userDomain.endsWith('microsoft.com'); } } export async function generateTemplateFile( root: string, type: ScaffoldType, fileInfo: TemplateFileInfo): Promise<boolean> { const targetFolderPath = path.join(root, fileInfo.targetPath); if (!await FileUtility.directoryExists(type, targetFolderPath)) { await FileUtility.mkdirRecursively(type, targetFolderPath); } const targetFilePath = path.join(targetFolderPath, fileInfo.fileName); if (fileInfo.fileContent) { try { await FileUtility.writeFile(type, targetFilePath, fileInfo.fileContent); } catch (error) { throw new Error(`Failed to create sketch file ${fileInfo.fileName}: ${ error.message}`); } } return true; } /** * If current folder is an IoT Workspace Project but not open correctly, ask * and open the IoT Workspace Project. Otherwise ask and New IoT Project. */ export async function handleIoTWorkspaceProjectFolder( telemetryContext: TelemetryContext): Promise<boolean> { if (!vscode.workspace.workspaceFolders || !vscode.workspace.workspaceFolders[0]) { return false; } const rootPath = vscode.workspace.workspaceFolders[0].uri.fsPath; const workbenchFileName = path.join(rootPath, 'Device', FileNames.iotworkbenchprojectFileName); const workspaceFiles = fs.readdirSync(rootPath).filter( file => path.extname(file).endsWith(FileNames.workspaceExtensionName)); if (fs.existsSync(workbenchFileName) && workspaceFiles && workspaceFiles[0]) { await askAndOpenProject(rootPath, workspaceFiles[0], telemetryContext); return true; } await askAndNewProject(telemetryContext); return true;
<<<<<<< // analyzer.analyze(results.blocks); console.log(blocks); ======= >>>>>>> // analyzer.analyze(results.blocks);
<<<<<<< import {AZ3166Device} from './Models/AZ3166Device'; import {IoTButtonDevice} from './Models/IoTButtonDevice'; import {RaspberryPiDevice} from './Models/RaspberryPiDevice'; import {Esp32Device} from './Models/Esp32Device'; import {CodeGenerateCore} from './pnp/CodeGenerateCore'; import {PnPMetaModelUtility, PnPMetaModelContext} from './pnp/PnPMetaModelUtility'; import {PnPMetaModelParser, PnPMetaModelGraph} from './pnp/PnPMetaModelGraph'; import {DeviceModelOperator} from './pnp/DeviceModelOperator'; import {PnPMetaModelJsonParser} from './pnp/PnPMetaModelJsonParser'; import {MetaModelType} from './pnp/pnp-api/DataContracts/PnPContext'; import {PnPDiagnostic} from './pnp/PnPDiagnostic'; import {VSCExpress} from 'vscode-express'; function filterMenu(commands: CommandItem[]) { for (let i = 0; i < commands.length; i++) { const command = commands[i]; let filtered = true; let containDeviceId = false; if (command.only) { let commandList: string[] = []; if (typeof command.only === 'string') { commandList = [command.only]; } else { commandList = command.only; } for (const key of commandList) { const hasRequiredConfig = ConfigHandler.get(key); if (hasRequiredConfig) { filtered = false; break; } } if (filtered) { commands.splice(i, 1); i--; } } if (command.deviceIds) { const boardId = ConfigHandler.get<string>(ConfigKey.boardId); for (const requiredDivice of command.deviceIds) { if (requiredDivice === boardId) { containDeviceId = true; } } if (!containDeviceId) { commands.splice(i, 1); i--; filtered = true; } } if (!filtered && command.children) { command.children = filterMenu(command.children); } } return commands; } async function renderMenu( parentLabel: string, commands: CommandItem[]|undefined) { if (commands === undefined) { return; } commands = filterMenu(commands); const selection = await vscode.window.showQuickPick( commands, {ignoreFocusOut: true, placeHolder: parentLabel}); if (!selection) { return; } for (let i = 0; i < commands.length; i++) { if (commands[i].label === selection.label && commands[i].description === selection.description) { if (commands[i].click !== undefined) { executeCommand(commands[i].click); } else if (commands[i].children !== undefined) { renderMenu(commands[i].label, commands[i].children); } return; } } } // tslint:disable-next-line: no-any function executeCommand(command: ((...args: any[]) => any)|undefined) { if (command === undefined) { return; } command(); } ======= >>>>>>> import {AZ3166Device} from './Models/AZ3166Device'; import {IoTButtonDevice} from './Models/IoTButtonDevice'; import {RaspberryPiDevice} from './Models/RaspberryPiDevice'; import {Esp32Device} from './Models/Esp32Device'; import {CodeGenerateCore} from './pnp/CodeGenerateCore'; import {PnPMetaModelUtility, PnPMetaModelContext} from './pnp/PnPMetaModelUtility'; import {PnPMetaModelParser, PnPMetaModelGraph} from './pnp/PnPMetaModelGraph'; import {DeviceModelOperator} from './pnp/DeviceModelOperator'; import {PnPMetaModelJsonParser} from './pnp/PnPMetaModelJsonParser'; import {MetaModelType} from './pnp/pnp-api/DataContracts/PnPContext'; import {PnPDiagnostic} from './pnp/PnPDiagnostic'; import {VSCExpress} from 'vscode-express'; <<<<<<< const deviceModelCreateInterfaceProvider = async () => { deviceModelOperator.CreateInterface(context, outputChannel); }; const deviceModelCreateCapabilityModelProvider = async () => { deviceModelOperator.CreateCapabilityModel(context, outputChannel); }; const menuForDevice: CommandItem[] = [ { label: 'Config Device Settings', description: '', detail: 'Config the settings on device to connect to Azure', click: deviceSettingsConfigProvider }, { label: 'Device Compile', description: '', detail: 'Compile device side code', click: deviceCompileProvider, deviceIds: [AZ3166Device.boardId, Esp32Device.boardId] }, { label: 'Device Upload', description: '', detail: 'Upload code to device', click: deviceUploadProvider, deviceIds: [ AZ3166Device.boardId, RaspberryPiDevice.boardId, Esp32Device.boardId ] }, { label: 'Install Device SDK', description: '', detail: 'Download device board package', click: devicePackageManager, deviceIds: [ AZ3166Device.boardId, IoTButtonDevice.boardId, RaspberryPiDevice.boardId, Esp32Device.boardId ] }, { label: 'Generate CRC', description: '', detail: 'Generate CRC for OTA', click: crcGenerateProvider, deviceIds: [AZ3166Device.boardId, Esp32Device.boardId] } ]; const menuForCloud: CommandItem[] = [ { label: 'Azure Provision', description: '', detail: 'Provision Azure services', click: azureProvisionProvider }, { label: 'Azure Deploy', description: '', detail: 'Deploy Azure Services', only: [ConfigKey.functionPath, ConfigKey.asaPath], click: azureDeployProvider } ]; const iotdeviceMenu = vscode.commands.registerCommand('iotworkbench.device', async () => { renderMenu('IoT Workbench: Device', menuForDevice); }); const iotcloudMenu = vscode.commands.registerCommand('iotworkbench.cloud', async () => { renderMenu('IoT Workbench: Cloud', menuForCloud); }); ======= >>>>>>> const deviceModelCreateInterfaceProvider = async () => { deviceModelOperator.CreateInterface(context, outputChannel); }; const deviceModelCreateCapabilityModelProvider = async () => { deviceModelOperator.CreateCapabilityModel(context, outputChannel); };
<<<<<<< generateRegistration: (reg, callback) => { const config = cli.getConfig(); ======= generateRegistration(reg, callback) { const config = cli.getConfig() as IConfig|null; if (!config) { throw Error('Config not ready'); } >>>>>>> generateRegistration: (reg, callback) => { const config = cli.getConfig() as IConfig|null; if (!config) { throw Error('Config not ready'); } <<<<<<< run: (cliPort: number, config: IConfig, registration: any) => { ======= run(cliPort: number, rawConfig: Record<string, undefined>|null, registration: any) { const config = rawConfig as IConfig|null; if (!config) { throw Error('Config not ready'); } >>>>>>> run: (cliPort: number, rawConfig: Record<string, undefined>|null, registration: any) => { const config = rawConfig as IConfig|null; if (!config) { throw Error('Config not ready'); }
<<<<<<< import { SlackRTMHandler } from "./SlackRTMHandler"; ======= import { TeamInfoResponse, ConversationsInfoResponse } from "./SlackResponses"; >>>>>>> import { SlackRTMHandler } from "./SlackRTMHandler"; import { TeamInfoResponse, ConversationsInfoResponse } from "./SlackResponses"; <<<<<<< const room = BridgedRoom.fromEntry(this, entry); await this.addBridgedRoom(room); ======= const hasToken = entry.remote.slack_team_id && entry.remote.slack_bot_token; const cli = !hasToken ? undefined : await this.createOrGetTeamClient( entry.remote.slack_team_id, entry.remote.slack_bot_token); const room = BridgedRoom.fromEntry(this, entry, cli); this.addBridgedRoom(room); >>>>>>> const hasToken = entry.remote.slack_team_id && entry.remote.slack_bot_token; const cli = !hasToken ? undefined : await this.createOrGetTeamClient( entry.remote.slack_team_id, entry.remote.slack_bot_token); const room = BridgedRoom.fromEntry(this, entry, cli); await this.addBridgedRoom(room);
<<<<<<< import { Bridge, PrometheusMetrics, StateLookup, Logging, Intent, UserMembership } from "matrix-appservice-bridge"; ======= import { Bridge, PrometheusMetrics, StateLookup, StateLookupEvent, Logging, Intent } from "matrix-appservice-bridge"; >>>>>>> import { Bridge, PrometheusMetrics, StateLookup, StateLookupEvent, Logging, Intent, UserMembership } from "matrix-appservice-bridge"; <<<<<<< public startTimer(name: string, labels: MetricsLabels = {}): TimerFunc { ======= public startTimer(name: string, labels: MetricsLabels = {}): (labels?: Record<string, string|number>) => void { >>>>>>> public startTimer(name: string, labels: MetricsLabels = {}): TimerFunc { <<<<<<< content: { is_direct: boolean; membership: UserMembership; ======= content: any, }): Promise<void> { if (ev.sender === this.botUserId) { // We don't want to handle echo. return; } // simple de-dup const recents = this.recentMatrixEventIds; for (let i = 0; i < recents.length; i++) { if (recents[i] && recents[i] === ev.event_id) { // move the most recent ev to where we found a dup and add the // duplicate at the end (reasoning: we only want one of the // duplicated ev_id in the list, but we want it at the end) recents[i] = recents[this.mostRecentEventIdIdx]; recents[this.mostRecentEventIdIdx] = ev.event_id; log.warn("Ignoring duplicate ev: " + ev.event_id); return; } >>>>>>> content: { is_direct: boolean; membership: UserMembership;
<<<<<<< await Promise.all(userIds.map((userId) => this.main.getIntent(userId).leave(roomId))); ======= await Promise.all(userIds.map(async (userId) => { return this.main.getIntent(userId).leave(roomId); })); >>>>>>> await Promise.all(userIds.map(async (userId) => this.main.getIntent(userId).leave(roomId)));
<<<<<<< // transform travis config await transformTravisConfig(options.inDir, options.outDir); // Delete files that were explicitly requested to be deleted. if (options.deleteFiles !== undefined) { await deleteGlobsSafe(options.deleteFiles, outDir); } ======= >>>>>>> // transform travis config await transformTravisConfig(options.inDir, options.outDir);
<<<<<<< import { ExtensionMessage, ExtensionMessageSender } from '../common/extensionMessaging'; ======= import {settingsHome} from './settingsHelper' // for poking around at internal applicationinsights options var sender = require ('applicationinsights/Library/Sender'); var telemetryLogger = require ('applicationinsights/Library/Logging'); >>>>>>> import { ExtensionMessage, ExtensionMessageSender } from '../common/extensionMessaging'; import {settingsHome} from './settingsHelper'
<<<<<<< // doIt(); // import "./programs/flappy"; import "./programs/compiler"; ======= doIt(); // import "./programs/flappy"; // import "./programs/hover"; >>>>>>> // doIt(); // import "./programs/flappy"; import "./programs/compiler"; // import "./programs/hover";
<<<<<<< await Promise.all(options.sources.map(async apiSource => { const source = await apiSource.handler.getMeshSource({ ======= for (const apiSource of options.sources) { const source = await apiSource.handlerLibrary.getMeshSource({ >>>>>>> for (const apiSource of options.sources) { const source = await apiSource.handlerLibrary.getMeshSource({ <<<<<<< filePathOrUrl: apiSource.source, config: apiSource.config, hooks, cache: options.cache || new InMemoryLRUCache(), ======= config: apiSource.handlerConfig || {}, hooks >>>>>>> config: apiSource.handlerConfig || {}, hooks, cache: options.cache || new InMemoryLRUCache(),
<<<<<<< export { deferred } from "https://deno.land/[email protected]/async/deferred.ts"; export { Drash } from "https://deno.land/x/[email protected]/mod.ts"; ======= export { deferred } from "https://deno.land/[email protected]/async/deferred.ts"; >>>>>>> export { deferred } from "https://deno.land/[email protected]/async/deferred.ts"; export { Drash } from "https://deno.land/x/[email protected]/mod.ts";
<<<<<<< const tasks = block.getUserTransactionAndProofs(this.wallet.address, this.predicatesManager).map(async tx => { tx.getSignedTx().getStateUpdates().forEach(stateUpdate => { if(this._spend(tx, stateUpdate)) { this.storage.addUserAction(tx.blkNum.toNumber(), UserActionUtil.createSend(tx)) ======= const tasks = block.getUserTransactionAndProofs(this.wallet.address).map(async tx => { tx.signedTx.getAllInputs().forEach(input => { if(this._spend(input)) { this.emit('send', {tx: tx}) this.storage.addUserAction(tx.blkNum.toNumber(), UserActionUtil.createSend(tx)) >>>>>>> const tasks = block.getUserTransactionAndProofs(this.wallet.address, this.predicatesManager).map(async tx => { tx.getSignedTx().getStateUpdates().forEach(stateUpdate => { if(this._spend(tx, stateUpdate)) { this.emit('send', {tx: tx}) this.storage.addUserAction(tx.blkNum.toNumber(), UserActionUtil.createSend(tx))
<<<<<<< import {HttpErrorResponse} from '@angular/common/http'; import {KeycloakService} from 'keycloak-angular'; ======= import {BookmarkStore} from '../../public/bookmark/store/BookmarkStore'; >>>>>>> import {HttpErrorResponse} from '@angular/common/http'; import {KeycloakService} from 'keycloak-angular'; <<<<<<< private markdownServce: MarkdownService, private zone: NgZone ======= private markdownServce: MarkdownService, private publicBookmarkStore: BookmarkStore >>>>>>> private markdownServce: MarkdownService, private publicBookmarkStore: BookmarkStore <<<<<<< obs.subscribe( res => { this.zone.run(() => { console.log('ZONE RUN for initial load of bookmarks'); // need to investigate this, or merge it with the async list stuff.... }); this.router.navigate(['/personal']); }); ======= >>>>>>>
<<<<<<< private _session: IDebugger.ISession | null; private _sessionChanged = new Signal<this, void>(this); private _service = new DebugService(null, this); private _currentLineChanged = new Signal<this, number>(this); ======= >>>>>>> private _currentLineChanged = new Signal<this, number>(this);
<<<<<<< // doIt(); // import "./programs/flappy"; import "./programs/editor"; ======= doIt(); // import "./programs/flappy"; // import "./programs/hover"; >>>>>>> // doIt(); // import "./programs/flappy"; // import "./programs/hover"; import "./programs/editor";
<<<<<<< editor.setGutterMarker( lineNumber, 'breakpoints', isRemoveGutter ? null : Private.createMarkerNode() ); setTimeout(this.setHover); ======= >>>>>>> <<<<<<< export function createHoverNode() { let hoverGutterElement = document.createElement('div'); hoverGutterElement.innerHTML = '●'; hoverGutterElement.className = GUTTER_HOVER_CLASS; hoverGutterElement.hidden = true; return hoverGutterElement; } ======= export function createBreakpoint( session: string, type: string, line: number ) { return { line, active: true, verified: true, source: { name: session } }; } >>>>>>> export function createHoverNode() { let hoverGutterElement = document.createElement('div'); hoverGutterElement.innerHTML = '●'; hoverGutterElement.className = GUTTER_HOVER_CLASS; hoverGutterElement.hidden = true; return hoverGutterElement; } export function createBreakpoint( session: string, type: string, line: number ) { return { line, active: true, verified: true, source: { name: session } }; }
<<<<<<< // Start service immediately (before mount) if specified in options if (immediate) { service.start(); } useEffect(() => { ======= useLayoutEffect(() => { >>>>>>> useEffect(() => {
<<<<<<< describe.skip('issue#20 - getOwnPropertyDescriptor', () => { it('readonly proxy prevents mutation when value accessed via accessor descriptor', () => { const target = new ReactiveMembrane(); const todos = {}; Object.defineProperty(todos, 'entry', { get() { return { foo: 'bar' }; }, configurable: true }); const proxy = target.getReadOnlyProxy(todos); const desc = Object.getOwnPropertyDescriptor(proxy, 'entry'); const { get } = desc; expect(() => { get().foo = ''; }).toThrow(); expect(todos['entry'].foo).toEqual('bar'); }); it('readonly proxy prevents mutation when value accessed via data descriptor', () => { const target = new ReactiveMembrane(); const todos = {}; Object.defineProperty(todos, 'entry', { value : { foo: 'bar' }, configurable: true }); const proxy = target.getReadOnlyProxy(todos); const desc = Object.getOwnPropertyDescriptor(proxy, 'entry'); const { value } = desc; expect( () => { value.foo = ''; }).toThrow(); expect(todos['entry'].foo).toEqual('bar'); }); }) ======= it('should throw when attempting to change the prototype', function() { const target = new ReactiveMembrane(); const obj = { foo: 'bar' }; const property = target.getReadOnlyProxy(obj); expect(() => { Object.setPrototypeOf(property, {}); }).toThrow(); }); it('should throw when attempting to change the prototype of a member property', function() { const target = new ReactiveMembrane(); const obj = { foo: { bar: 'baz' } }; const property = target.getReadOnlyProxy(obj); expect(() => { Object.setPrototypeOf(property.foo, {}); }).toThrow(); }); >>>>>>> describe.skip('issue#20 - getOwnPropertyDescriptor', () => { it('readonly proxy prevents mutation when value accessed via accessor descriptor', () => { const target = new ReactiveMembrane(); const todos = {}; Object.defineProperty(todos, 'entry', { get() { return { foo: 'bar' }; }, configurable: true }); const proxy = target.getReadOnlyProxy(todos); const desc = Object.getOwnPropertyDescriptor(proxy, 'entry'); const { get } = desc; expect(() => { get().foo = ''; }).toThrow(); expect(todos['entry'].foo).toEqual('bar'); }); it('readonly proxy prevents mutation when value accessed via data descriptor', () => { const target = new ReactiveMembrane(); const todos = {}; Object.defineProperty(todos, 'entry', { value : { foo: 'bar' }, configurable: true }); const proxy = target.getReadOnlyProxy(todos); const desc = Object.getOwnPropertyDescriptor(proxy, 'entry'); const { value } = desc; expect( () => { value.foo = ''; }).toThrow(); expect(todos['entry'].foo).toEqual('bar'); }); }); it('should throw when attempting to change the prototype', function() { const target = new ReactiveMembrane(); const obj = { foo: 'bar' }; const property = target.getReadOnlyProxy(obj); expect(() => { Object.setPrototypeOf(property, {}); }).toThrow(); }); it('should throw when attempting to change the prototype of a member property', function() { const target = new ReactiveMembrane(); const obj = { foo: { bar: 'baz' } }; const property = target.getReadOnlyProxy(obj); expect(() => { Object.setPrototypeOf(property.foo, {}); }).toThrow(); });
<<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data1 = await makePromise<Result>( ======= const { data: data1 } = await makePromise( >>>>>>> const { data: data1 } = await makePromise<Result>( <<<<<<< const data2 = await makePromise<Result>( ======= const { data: data2 } = await makePromise( >>>>>>> const { data: data2 } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>( <<<<<<< const data = await makePromise<Result>( ======= const { data } = await makePromise( >>>>>>> const { data } = await makePromise<Result>(
<<<<<<< relayHub = await RelayHub.new( stakeManager.address, penalizer.address, relayHubConfiguration.MAX_WORKER_COUNT, relayHubConfiguration.GAS_RESERVE, relayHubConfiguration.POST_OVERHEAD, relayHubConfiguration.GAS_OVERHEAD, relayHubConfiguration.MAXIMUM_RECIPIENT_DEPOSIT, relayHubConfiguration.MINIMUM_RELAY_BALANCE, relayHubConfiguration.MINIMUM_UNSTAKE_DELAY, relayHubConfiguration.MINIMUM_STAKE) await paymaster.setTrustedForwarder(forwarder) ======= relayHub = await deployHub(stakeManager.address, penalizer.address) >>>>>>> relayHub = await deployHub(stakeManager.address, penalizer.address) await paymaster.setTrustedForwarder(forwarder)
<<<<<<< export { default as AtSteps } from './steps' ======= export { default as AtCurtain } from './curtain' >>>>>>> export { default as AtSteps } from './steps' export { default as AtCurtain } from './curtain'
<<<<<<< pretty = await run_prettier_string(input, options); ======= switch (options.parser) { case "latex": pretty = await latex_format(input, options); break; case "python": pretty = await python_format(input, options, logger); break; case "r": pretty = await r_format(input, options, logger); break; default: pretty = prettier.format(input, options); } >>>>>>> pretty = await run_prettier_string(input, options, logger);
<<<<<<< // for X11, we just want to communicate the %-value set_status_font_size(font_size: number, default_font_size) { const percent = Math.round((font_size * 100) / default_font_size); this.set_status(`Set zoom to ${percent}%`, 1500); } ======= help(): void { open_new_tab(HELP_URL); } >>>>>>> // for X11, we just want to communicate the %-value set_status_font_size(font_size: number, default_font_size) { const percent = Math.round((font_size * 100) / default_font_size); this.set_status(`Set zoom to ${percent}%`, 1500); } help(): void { open_new_tab(HELP_URL); }
<<<<<<< ======= strategies?: immutable.List<string>; keyboard_variant_options?: immutable.List<any>; >>>>>>> keyboard_variant_options?: immutable.List<any>;
<<<<<<< } export const VERSION_COOKIE_NAME = "cocalc_version"; ======= } // helps with converting an array of strings to a union type of strings. // usage: 1. const foo : string[] = tuple(["bar", "baz"]); // 2. type Foo = typeof foo[number]; // bar | baz; export function tuple<T extends string[]>(o: T) { return o; } >>>>>>> } export const VERSION_COOKIE_NAME = "cocalc_version"; // helps with converting an array of strings to a union type of strings. // usage: 1. const foo : string[] = tuple(["bar", "baz"]); // 2. type Foo = typeof foo[number]; // bar | baz; export function tuple<T extends string[]>(o: T) { return o; }
<<<<<<< for (let cmd in keybindings) { const keys = keybindings[cmd]; for (key of keys.split(" ")) { f(key, cmd); } ======= // use a closure to bind cmd. const f = (key, cmd) => (extraKeys[key] = cm => { cm.edit_selection({ cmd }); return actions.set_syncstring_to_codemirror(); }); for (const cmd in keybindings) { const keys = keybindings[cmd]; for (key of keys.split(" ")) { f(key, cmd); >>>>>>> for (const cmd in keybindings) { const keys = keybindings[cmd]; for (key of keys.split(" ")) { f(key, cmd); }
<<<<<<< export { default as AtTabsPane } from './tabs-pane' export { default as AtSwipeAction } from './swipe-action' export { default as AtAccordion } from './accordion' ======= export { default as AtTabsPane } from './tabs-pane' export declare const AtModalHeader: ComponentClass export declare const AtModalAction: ComponentClass export declare const AtModalContent: ComponentClass export declare const AtActionSheetItem: ComponentClass >>>>>>> export { default as AtTabsPane } from './tabs-pane' export { default as AtSwipeAction } from './swipe-action' export { default as AtAccordion } from './accordion' export declare const AtModalHeader: ComponentClass export declare const AtModalAction: ComponentClass export declare const AtModalContent: ComponentClass export declare const AtActionSheetItem: ComponentClass
<<<<<<< export * from "./misc"; export * from "./sanitize"; export * from "./language"; export * from "./iframe"; export * from "./cookies"; export * from "./tracking"; ======= export { sagews_canonical_mode } from "./sagews-canonical-mode"; >>>>>>> export * from "./misc"; export * from "./sanitize"; export * from "./language"; export * from "./iframe"; export * from "./cookies"; export * from "./tracking"; export * from "./sagews-canonical-mode";
<<<<<<< "Set if there is an error computing the directory listing, e.g., if there is no directory this may happen. This will be cleared once the listing is successfully computed." }, deleted: { type: "array", pg_type: "TEXT[]", desc: "Paths within this directory that have been explicitly deleted by a user" } ======= "Set if there is an error computing the directory listing, e.g., if there is no directory this may happen. This will be cleared once the listing is successfully computed.", }, >>>>>>> "Set if there is an error computing the directory listing, e.g., if there is no directory this may happen. This will be cleared once the listing is successfully computed.", }, deleted: { type: "array", pg_type: "TEXT[]", desc: "Paths within this directory that have been explicitly deleted by a user", }, <<<<<<< error: null, deleted: null } ======= error: null, }, >>>>>>> error: null, deleted: null, }, <<<<<<< interest: true, deleted: true } } ======= interest: true, }, }, >>>>>>> interest: true, deleted: true, }, }, <<<<<<< error: null, deleted: null } ======= error: null, }, >>>>>>> error: null, deleted: null, }, <<<<<<< error: true, deleted: true } } } } ======= error: true, }, }, }, }, >>>>>>> error: true, deleted: true, }, }, }, },
<<<<<<< import { ConfirmDialogOptions } from "./confirm-dialog"; import { callback2 } from "smc-util/async-utils"; import { JUPYTER_CLASSIC_MODERN } from "smc-util/theme"; const { instantiate_assistant } = require("../assistant/main"); ======= const { instantiate_snippets } = require("../assistant/main"); const { commands } = require("./commands"); >>>>>>> import { ConfirmDialogOptions } from "./confirm-dialog"; import { callback2 } from "smc-util/async-utils"; import { JUPYTER_CLASSIC_MODERN } from "smc-util/theme"; const { instantiate_snippets } = require("../assistant/main"); <<<<<<< private account_change_editor_settings: any; ======= private snippet_actions: any; private _account_change_editor_settings: any; private _commands: any; >>>>>>> private account_change_editor_settings: any; <<<<<<< public show_code_assistant(id: string): void { if (this.assistant_actions == null) { throw Error("code assistant not available"); ======= show_code_snippets = () => { if (this.snippet_actions == null) { return; >>>>>>> public show_code_snippets(id: string): void { if (this.snippet_actions == null) { throw Error("code assistant not available"); <<<<<<< this.assistant_actions.init(lang); this.assistant_actions.set({ ======= this.snippet_actions.init(lang); return this.snippet_actions.set({ >>>>>>> this.snippet_actions.init(lang); this.snippet_actions.set({
<<<<<<< getContributorsForProject(projectId: number) : Promise<HttpResponse<Contributor[]>> { return this.httpClient.get<Contributor[]>(this.apiURL + 'projects/' + projectId + '/contributors', {observe: 'response'}).toPromise(); } ======= /** * Get the dependencyTree for to build a levelized structure map for a specific commit. * Sends a GET request to /analyzers/{projectId}/structureMap/{commitName} * @param projectId The project id. * @param commitName The name (hash) of the commit. */ public getDependencyTree(projectId: number, commitName: string) { return this.httpClient.get(this.apiURL + 'analyzers/' + projectId + '/structureMap/' + commitName, {observe: 'response'}).toPromise(); } /** * Get the dependencyTree to compare two given commits in a levelized structure map. * Sends GET requerst to /analyzers/{projectId}/structureMap/{commitName1}/{commitName2} * @param projectId The project id. * @param commitName1 The name (hash) of the first commit. * @param commitName2 The name (hash) of the second commit. */ public getCompareTree(projectId: number, commitName1: string, commitName2: string) { return this.httpClient.get(this.apiURL + 'analyzers/' + projectId + '/structureMap/' + commitName1 + '/' + commitName2, {observe: 'response'}).toPromise(); } >>>>>>> getContributorsForProject(projectId: number) : Promise<HttpResponse<Contributor[]>> { return this.httpClient.get<Contributor[]>(this.apiURL + 'projects/' + projectId + '/contributors', {observe: 'response'}).toPromise(); /** * Get the dependencyTree for to build a levelized structure map for a specific commit. * Sends a GET request to /analyzers/{projectId}/structureMap/{commitName} * @param projectId The project id. * @param commitName The name (hash) of the commit. */ public getDependencyTree(projectId: number, commitName: string) { return this.httpClient.get(this.apiURL + 'analyzers/' + projectId + '/structureMap/' + commitName, {observe: 'response'}).toPromise(); } /** * Get the dependencyTree to compare two given commits in a levelized structure map. * Sends GET requerst to /analyzers/{projectId}/structureMap/{commitName1}/{commitName2} * @param projectId The project id. * @param commitName1 The name (hash) of the first commit. * @param commitName2 The name (hash) of the second commit. */ public getCompareTree(projectId: number, commitName1: string, commitName2: string) { return this.httpClient.get(this.apiURL + 'analyzers/' + projectId + '/structureMap/' + commitName1 + '/' + commitName2, {observe: 'response'}).toPromise(); }
<<<<<<< templateUrl: './lib/swiper.component.html', styleUrls: [ './lib/swiper.component.css' ], ======= exportAs: 'ngxSwiper', templateUrl: './swiper.component.html', styleUrls: ['./swiper.component.css'], >>>>>>> exportAs: 'ngxSwiper', templateUrl: './lib/swiper.component.html', styleUrls: [ './lib/swiper.component.css' ], <<<<<<< @Output('scroll' ) S_SCROLL = new EventEmitter<any>(); @Output('progress' ) S_PROGRESS = new EventEmitter<any>(); ======= @Output('scroll' ) S_SCROLL = new EventEmitter<any>(); @Output('progress' ) S_PROGRESS = new EventEmitter<any>(); @Output('keyPress' ) S_KEYPRESS = new EventEmitter<any>(); @Output('beforeResize' ) S_BEFORERESIZE = new EventEmitter<any>(); @Output('afterResize' ) S_AFTERRESIZE = new EventEmitter<any>(); >>>>>>> @Output('scroll' ) S_SCROLL = new EventEmitter<any>(); @Output('progress' ) S_PROGRESS = new EventEmitter<any>();
<<<<<<< tagPrefix?: string; tagSeparator?: string; ======= udsGracefulErrorHandling?: boolean; udsGracefulRestartRateLimit?: number; >>>>>>> tagPrefix?: string; tagSeparator?: string; udsGracefulErrorHandling?: boolean; udsGracefulRestartRateLimit?: number;
<<<<<<< /** position of elements */ translate: 0.0, ======= /** use button role for items */ useButtonRole: true, >>>>>>> /** position of elements */ translate: 0.0, /** use button role for items */ useButtonRole: true,
<<<<<<< if (isValidElement(vnode)) { const vtype = vnode.vtype if (vtype & (VType.Composite | VType.Stateless)) { domNode = (vnode as any).init(parentComponent) } else if (vtype & VType.Text) { domNode = doc.createTextNode((vnode as any).text); (vnode as any).dom = domNode } else if (vtype & VType.Node) { domNode = mountVNode(vnode as any, isSvg, parentComponent) } else if (vtype & VType.Void) { domNode = (vnode as any).dom } ======= if (isWidget(vnode)) { domNode = vnode.init(parentContext) >>>>>>> if (isValidElement(vnode)) { const vtype = vnode.vtype if (vtype & (VType.Composite | VType.Stateless)) { domNode = (vnode as any).init(parentContext) } else if (vtype & VType.Text) { domNode = doc.createTextNode((vnode as any).text); (vnode as any).dom = domNode } else if (vtype & VType.Node) { domNode = mountVNode(vnode as any, isSvg, parentContext) } else if (vtype & VType.Void) { domNode = (vnode as any).dom } <<<<<<< ======= } else if (isVNode(vnode)) { if (vnode.type === 'svg') { isSvg = true } else if (vnode.type === 'foreignObject') { isSvg = false } if (!isSupportSVG) { isSvg = false } if (isSvg) { vnode.namespace = SVG_NAMESPACE } domNode = vnode.namespace === null ? doc.createElement(vnode.type) : isSupportSVG ? doc.createElementNS(vnode.namespace, vnode.type) : doc.createElement(vnode.type) setProps(domNode, vnode, isSvg) const children = vnode.children if (isArray(children)) { for (let i = 0; i < children.length; i++) { mountChild( children[i] as VirtualNode, domNode, parentContext, isSvg ) } } else { mountChild(children, domNode, parentContext, isSvg) } vnode.dom = domNode if (vnode.ref !== null) { Ref.attach(vnode, vnode.ref, domNode) } >>>>>>> <<<<<<< child.parentContext = parentContext || EMPTY_OBJ const childNode = createElement(child as VNode, isSvg, parentComponent) if (childNode !== null) { ======= const childNode = createElement(child as VNode, isSvg, parentContext) if (childNode) { >>>>>>> child.parentContext = parentContext || EMPTY_OBJ const childNode = createElement(child as VNode, isSvg, parentContext) if (childNode !== null) {
<<<<<<< throw new Error(`Cannot find test-cloud.exe, the exe was not found in the path specified by "--uitest-tools-dir".${os.EOL}` + `Please check that ${testCloudPath} points to a test-cloud.exe.${os.EOL}` + `Minimum required version is "${UITestPreparer.getMinimumVersionString()}".`); ======= testCloudPath = path.join(toolsDir, "Xamarin.UITest.Console.exe"); if (!await fileExists(testCloudPath)) { throw new Error(`Cannot find test-cloud.exe, the exe was not found in the path specified by "--uitest-tools-dir".${os.EOL}` + `Please check that ${testCloudPath} points to a test-cloud.exe.${os.EOL}` + `Minimum required version is "${this.getMinimumVersionString()}".`); } >>>>>>> testCloudPath = path.join(toolsDir, "Xamarin.UITest.Console.exe"); if (!await fileExists(testCloudPath)) { throw new Error(`Cannot find test-cloud.exe, the exe was not found in the path specified by "--uitest-tools-dir".${os.EOL}` + `Please check that ${testCloudPath} points to a test-cloud.exe.${os.EOL}` + `Minimum required version is "${UITestPreparer.getMinimumVersionString()}".`); }
<<<<<<< ======= hasTags() { return this.branches !== undefined && this.branches.filter(b => b.isTag).length > 0; } } @Component({ selector: 'app-dialog-overview-example-dialog', templateUrl: 'app-merge-dialog.html', }) export class MergeDialogComponent { constructor( public dialogRef: MatDialogRef<MergeDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: DialogData) {} onNoClick(): void { this.dialogRef.close(); } >>>>>>> hasTags() { return this.branches !== undefined && this.branches.filter(b => b.isTag).length > 0; }
<<<<<<< try { const xml = new DOMParser().parseFromString(fs.readFileSync(fullPath, "utf-8"), "text/xml"); let name: string = "unknown"; const matches = entry.path.match("^(.*)[_-]nunit[_-]report"); if (matches && matches.length > 1) { name = matches[1].replace(/\./gi, "_"); } self.appendToTestNameTransformation(xml, `_${name}`); self.removeIgnoredTransformation(xml); self.removeEmptySuitesTransformation(xml); if (mainXml) { mainXml = self.combine(mainXml, xml); } else { mainXml = xml; } } catch (e) { reject(e); ======= const xml: Document = new DOMParser().parseFromString(fs.readFileSync(fullPath, "utf-8")); let name: string = "unknown"; const matches: RegExpMatchArray = entry.path.match("^(.*)[_-]nunit[_-]report"); if (matches && matches.length > 1) { name = matches[1].replace(/\./gi, "_"); } self.appendToTestNameTransformation(xml, `_${name}`); self.removeIgnoredTransformation(xml); self.removeEmptySuitesTransformation(xml); if (mainXml) { mainXml = self.combine(mainXml, xml); } else { mainXml = xml; >>>>>>> try { const xml: Document = new DOMParser().parseFromString(fs.readFileSync(fullPath, "utf-8"), "text/xml"); let name: string = "unknown"; const matches: RegExpMatchArray = entry.path.match("^(.*)[_-]nunit[_-]report"); if (matches && matches.length > 1) { name = matches[1].replace(/\./gi, "_"); } self.appendToTestNameTransformation(xml, `_${name}`); self.removeIgnoredTransformation(xml); self.removeEmptySuitesTransformation(xml); if (mainXml) { mainXml = self.combine(mainXml, xml); } else { mainXml = xml; } } catch (e) { reject(e);
<<<<<<< import { CommandArgs } from "../../../util/commandline/command"; import { MobileCenterClient, models, clientRequest } from "../../../util/apis"; ======= import { AppCenterClient, models, clientRequest } from "../../../util/apis"; >>>>>>> import { CommandArgs } from "../../../util/commandline/command"; import { AppCenterClient, models, clientRequest } from "../../../util/apis"; <<<<<<< private readonly releaseStrategy: ReleaseStrategy; constructor(args: CommandArgs) { super(args); // Сurrently use old service due to we have limitation of 1MB payload limit through bifrost service this.releaseStrategy = new LegacyCodePushRelease(); } public async run(client: MobileCenterClient): Promise<CommandResult> { ======= public async run(client: AppCenterClient): Promise<CommandResult> { >>>>>>> private readonly releaseStrategy: ReleaseStrategy; constructor(args: CommandArgs) { super(args); // Сurrently use old service due to we have limitation of 1MB payload limit through bifrost service this.releaseStrategy = new LegacyCodePushRelease(); } public async run(client: AppCenterClient): Promise<CommandResult> { <<<<<<< var user = await getUser(); const serverUrl = environments(this.environmentName || user.environment).managementEndpoint; const token = this.token || await user.accessToken; await out.progress("Creating CodePush release...", this.releaseStrategy.release(client, this.app, this.deploymentName, updateContentsZipPath, { appVersion: this.targetBinaryVersion, description: this.description, isDisabled: this.disabled, isMandatory: this.mandatory, rollout: this.rollout }, debug, token, serverUrl)); ======= const httpRequest = await out.progress("Creating CodePush release...", clientRequest<models.CodePushRelease>( (cb) => client.codePushDeploymentReleases.create( this.deploymentName, this.targetBinaryVersion, this.app.ownerName, this.app.appName, { packageParameter: fs.createReadStream(updateContentsZipPath), deploymentName1: this.deploymentName, description: this.description, disabled: this.disabled, mandatory: this.mandatory, noDuplicateReleaseError: this.noDuplicateReleaseError, rollout: this.rollout, }, cb))); >>>>>>> var user = await getUser(); const serverUrl = environments(this.environmentName || user.environment).managementEndpoint; const token = this.token || await user.accessToken; await out.progress("Creating CodePush release...", this.releaseStrategy.release(client, this.app, this.deploymentName, updateContentsZipPath, { appVersion: this.targetBinaryVersion, description: this.description, isDisabled: this.disabled, isMandatory: this.mandatory, rollout: this.rollout }, debug, token, serverUrl));
<<<<<<< /// <reference path="globals/temp/index.d.ts" /> /// <reference path="modules/async/index.d.ts" /> ======= /// <reference path="globals/rx/index.d.ts" /> /// <reference path="globals/temp/index.d.ts" /> >>>>>>> /// <reference path="globals/temp/index.d.ts" /> /// <reference path="modules/async/index.d.ts" /> /// <reference path="globals/rx/index.d.ts" /> /// <reference path="globals/temp/index.d.ts" />
<<<<<<< import { FeatureManagementModule } from '@abp/ng.feature-management'; ======= import { NgxValidateCoreModule } from '@ngx-validate/core'; >>>>>>> import { FeatureManagementModule } from '@abp/ng.feature-management'; import { NgxValidateCoreModule } from '@ngx-validate/core';
<<<<<<< import { ConfigPlugin, NGXS_CONFIG_PLUGIN_OPTIONS } from './plugins/config/config.plugin'; ======= import { ConfigPlugin, NGXS_CONFIG_PLUGIN_OPTIONS } from './plugins/config.plugin'; import { LocaleProvider } from './providers/locale.provider'; >>>>>>> import { LocaleProvider } from './providers/locale.provider'; <<<<<<< import { getInitialData } from './utils/initial-utils'; ======= import { getInitialData, localeInitializer } from './utils/initial-utils'; >>>>>>> import { getInitialData, localeInitializer } from './utils/initial-utils'; import { ConfigPlugin, NGXS_CONFIG_PLUGIN_OPTIONS } from './plugins/config/config.plugin';
<<<<<<< import {Contributor} from '../../model/contributor' ======= import {Branch} from '../../model/branch'; >>>>>>> import {Contributor} from '../../model/contributor' import {Branch} from '../../model/branch'; <<<<<<< contributors: Contributor[]; ======= branches: Branch[]; >>>>>>> contributors: Contributor[]; branches: Branch[]; <<<<<<< this.getProjectContributors(); ======= this.getBranchesInProject(); >>>>>>> this.getProjectContributors(); this.getBranchesInProject();
<<<<<<< ======= providers: [MessageService], mocks: [OAuthService], >>>>>>> mocks: [OAuthService], <<<<<<< ======= it('should display an error toast', () => { service.error('test', 'title'); spectator.detectChanges(); expect(spectator.query('p-toast')).toBeTruthy(); expect(spectator.query('p-toastitem')).toBeTruthy(); expect(spectator.query('span.ui-toast-icon')).toHaveClass('pi-times'); expect(spectator.query('div.ui-toast-summary')).toHaveText('title'); expect(spectator.query('div.ui-toast-detail')).toHaveText('test'); }); it('should display a warning toast', () => { service.warn('test', 'title'); spectator.detectChanges(); expect(spectator.query('span.ui-toast-icon')).toHaveClass('pi-exclamation-triangle'); }); it('should display a success toast', () => { service.success('test', 'title'); spectator.detectChanges(); expect(spectator.query('span.ui-toast-icon')).toHaveClass('pi-check'); }); it('should display an info toast', () => { service.info('test', 'title'); spectator.detectChanges(); expect(spectator.query('span.ui-toast-icon')).toHaveClass('pi-info-circle'); }); it('should display multiple toasts', () => { service.addAll([ { summary: 'summary1', detail: 'detail1' }, { summary: 'summary2', detail: 'detail2' }, ]); spectator.detectChanges(); expect( spectator.queryAll('div.ui-toast-summary').map(node => node.textContent.trim()), ).toEqual(['summary1', 'summary2']); expect(spectator.queryAll('div.ui-toast-detail').map(node => node.textContent.trim())).toEqual([ 'detail1', 'detail2', ]); }); it('should remove the opened toast', () => { service.info('test', 'title'); spectator.detectChanges(); expect(spectator.query('p-toastitem')).toBeTruthy(); service.clear(); spectator.detectChanges(); expect(spectator.query('p-toastitem')).toBeFalsy(); }); >>>>>>>
<<<<<<< import { StoreModule } from '@ngrx/store'; import { EffectsModule } from '@ngrx/effects'; import * as fromAuth from '../../../auth/store'; import { ComponentWrapperDirective } from '../../../cms/components'; import * as fromCmsReducer from '../../../cms/store/reducers'; import { SiteContextModule } from '../../../site-context'; import * as fromUserReducer from '../../../user/store/reducers'; import { LoginComponent } from './../../../user/components/login/login.component'; ======= >>>>>>> <<<<<<< import { CmsModuleConfig } from '../../../cms/cms-module-config'; import { OutletDirective } from '../../../outlet'; import { PwaModule } from './../../../pwa/pwa.module'; import { PWAModuleConfig, defaultPWAModuleConfig } from '../../../pwa/pwa.module-config'; import { SiteContextConfig } from '@spartacus/core'; import { Input, Component } from '@angular/core'; const MockCmsModuleConfig: CmsModuleConfig = { site: { language: 'de', currency: 'JPY' } }; ======= import { HeaderComponent } from './header.component'; @Component({ selector: 'cx-language-selector', template: '' }) class MockLanguageSelectorComponent {} @Component({ selector: 'cx-currency-selector', template: '' }) class MockCurrencySelectorComponent {} @Component({ selector: 'cx-dynamic-slot', template: '' }) class MockDynamicSlotComponent { @Input() position: string; } @Component({ selector: 'cx-login', template: '' }) class MockLoginComponent {} @Component({ selector: 'cx-mobile-menu', template: '' }) class MockMobileMenuComponent {} >>>>>>> import { HeaderComponent } from './header.component'; @Component({ selector: 'cx-language-selector', template: '' }) class MockLanguageSelectorComponent {} @Component({ selector: 'cx-currency-selector', template: '' }) class MockCurrencySelectorComponent {} <<<<<<< MockDynamicSlotComponent, ComponentWrapperDirective, ======= MockDynamicSlotComponent, MockLanguageSelectorComponent, MockCurrencySelectorComponent, MockLoginComponent, MockMobileMenuComponent, >>>>>>> MockDynamicSlotComponent, MockLanguageSelectorComponent, MockCurrencySelectorComponent, MockLoginComponent, MockMobileMenuComponent,
<<<<<<< ======= private userStore: Store<fromUserStore.UserState>, private cartStore: Store<fromCartStore.CartState>, >>>>>>> private userStore: Store<fromUserStore.UserState>,
<<<<<<< import { SpinnerModule } from './spinner/spinner.module'; ======= import { GenericLinkModule } from './generic-link/generic-link.module'; >>>>>>> import { SpinnerModule } from './spinner/spinner.module'; import { GenericLinkModule } from './generic-link/generic-link.module'; <<<<<<< import { SpinnerComponent } from './spinner/spinner.component'; ======= import { GenericLinkComponent } from './generic-link/generic-link.component'; >>>>>>> import { SpinnerComponent } from './spinner/spinner.component'; import { GenericLinkComponent } from './generic-link/generic-link.component'; <<<<<<< PaginationAndSortingModule, SpinnerModule ======= PaginationAndSortingModule, GenericLinkModule >>>>>>> PaginationAndSortingModule, SpinnerModule, GenericLinkModule <<<<<<< SortingComponent, SpinnerComponent ======= SortingComponent, GenericLinkComponent >>>>>>> SortingComponent, SpinnerComponent, GenericLinkComponent
<<<<<<< import { PageType } from '../../routing/models/page-context.model'; import { RoutingService } from '../../routing/facade/routing.service'; import { CmsService } from '../facade/cms.service'; ======= import { DefaultPageService } from '../services/default-page.service'; import { CmsModuleConfig } from '../cms-module-config'; import * as fromReducers from '../store/reducers'; import { Page } from '../models/page.model'; import * as fromActions from '../store/actions/page.action'; import { RoutingService, PageType } from '@spartacus/core'; >>>>>>> import { CmsService } from '../facade/cms.service'; import { RoutingService, PageType } from '@spartacus/core';
<<<<<<< import { browser, element, by, ElementArrayFinder, ElementFinder } from 'protractor'; import { print } from 'util'; ======= import { element, by } from 'protractor'; >>>>>>> import { element, by, ElementArrayFinder, ElementFinder } from 'protractor';
<<<<<<< export * from './lib/my-account/order/order.module'; export * from './lib/my-account/my-account.module'; ======= export * from './lib/services/services.module'; >>>>>>> export * from './lib/my-account/order/order.module'; export * from './lib/my-account/my-account.module'; export * from './lib/services/services.module';
<<<<<<< import { ActivatedRoute } from '@angular/router'; import { OnInit } from '@angular/core/src/metadata/lifecycle_hooks'; ======= import { Component, OnDestroy, OnInit } from '@angular/core'; >>>>>>> import { ActivatedRoute } from '@angular/router'; import { Component, OnDestroy, OnInit } from '@angular/core';
<<<<<<< ======= >>>>>>> <<<<<<< import { GlobalMessageService } from '../../../../global-message/facade/global-message.service'; import { RoutingService } from '../../../../routing/facade/routing.service'; import { checkoutNavBar } from './checkout-navigation-bar'; ======= import { RoutingService } from '@spartacus/core'; >>>>>>> import { GlobalMessageService } from '../../../../global-message/facade/global-message.service'; import { RoutingService } from '@spartacus/core'; import { checkoutNavBar } from './checkout-navigation-bar';
<<<<<<< import { StoreFinderGridComponent } from './components/store-finder-grid/store-finder-grid.component'; ======= import { PaginationAndSortingModule } from '../ui/components/pagination-and-sorting/pagination-and-sorting.module'; import { BootstrapModule } from '../bootstrap.module'; >>>>>>> import { StoreFinderGridComponent } from './components/store-finder-grid/store-finder-grid.component'; import { PaginationAndSortingModule } from '../ui/components/pagination-and-sorting/pagination-and-sorting.module'; import { BootstrapModule } from '../bootstrap.module';
<<<<<<< refreshToken(refreshToken: string) { const url = this.getOAuthEndpoint(); let creds = ''; creds += 'client_id=' + encodeURIComponent(this.configService.authentication.client_id); creds += '&client_secret=' + encodeURIComponent(this.configService.authentication.client_secret); creds += '&refresh_token=' + encodeURI(refreshToken); creds += '&grant_type=refresh_token'; const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' }); return this.http .post(url, creds, { headers }) .pipe(catchError((error: any) => throwError(error))); } ======= registerUser(user: UserRegisterFormData): Observable<any> { const url = this.getUserEndpoint(); const headers = new HttpHeaders({ 'Content-Type': 'application/json' }); return this.http .post(url, user, { headers: headers }) .pipe(catchError((error: any) => throwError(error.json()))); } >>>>>>> refreshToken(refreshToken: string) { const url = this.getOAuthEndpoint(); let creds = ''; creds += 'client_id=' + encodeURIComponent(this.configService.authentication.client_id); creds += '&client_secret=' + encodeURIComponent(this.configService.authentication.client_secret); creds += '&refresh_token=' + encodeURI(refreshToken); creds += '&grant_type=refresh_token'; const headers = new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded' }); return this.http .post(url, creds, { headers }) .pipe(catchError((error: any) => throwError(error))); } registerUser(user: UserRegisterFormData): Observable<any> { const url = this.getUserEndpoint(); const headers = new HttpHeaders({ 'Content-Type': 'application/json' }); return this.http .post(url, user, { headers: headers }) .pipe(catchError((error: any) => throwError(error.json()))); }
<<<<<<< import {DependencyRootComponent} from './levelized-structure-map/dependency-root/dependency-root.component'; import {DependencyCompareComponent} from './levelized-structure-map/dependency-compare/dependency-compare.component'; import {TreeNodeComponent} from './levelized-structure-map/tree-node/tree-node.component'; import {MatSelectModule} from '@angular/material/select'; import {DragScrollModule} from 'ngx-drag-scroll'; import {PinchZoomModule} from 'ngx-pinch-zoom'; import {ScrollingModule} from '@angular/cdk/scrolling'; import { ListViewComponent } from './view/project-dashboard/list-view/list-view.component'; import { BranchViewComponent } from './view/project-dashboard/branch-view/branch-view.component'; import { FileViewComponent } from './view/file-view/file-view.component'; ======= import {ScreenInteractionService} from "./city-map/service/screen-interaction.service"; >>>>>>> import {ScreenInteractionService} from "./city-map/service/screen-interaction.service"; import {DependencyRootComponent} from './levelized-structure-map/dependency-root/dependency-root.component'; import {DependencyCompareComponent} from './levelized-structure-map/dependency-compare/dependency-compare.component'; import {TreeNodeComponent} from './levelized-structure-map/tree-node/tree-node.component'; import {MatSelectModule} from '@angular/material/select'; import {DragScrollModule} from 'ngx-drag-scroll'; import {PinchZoomModule} from 'ngx-pinch-zoom'; import {ScrollingModule} from '@angular/cdk/scrolling'; import { ListViewComponent } from './view/project-dashboard/list-view/list-view.component'; import { BranchViewComponent } from './view/project-dashboard/branch-view/branch-view.component'; import { FileViewComponent } from './view/file-view/file-view.component';
<<<<<<< import { AuthService } from '../facade/auth.service'; import { RoutingService } from '../../routing/facade/routing.service'; ======= import { Store, select } from '@ngrx/store'; import * as fromStore from './../store'; import { RoutingService } from '@spartacus/core'; >>>>>>> import { AuthService } from '../facade/auth.service';
<<<<<<< import { StoreListPageModule } from './store-list-page/store-list-page.module'; ======= import { ContactPageModule } from './contact-page/contact-page.module'; import { SalePageModule } from './sale-page/sale-page.module'; import { HelpPageModule } from './help-page/help-page.module'; import { ResetNewPasswordPageModule } from './reset-new-password-page/reset-new-password-page.module'; >>>>>>> import { StoreListPageModule } from './store-list-page/store-list-page.module'; import { ContactPageModule } from './contact-page/contact-page.module'; import { SalePageModule } from './sale-page/sale-page.module'; import { HelpPageModule } from './help-page/help-page.module'; import { ResetNewPasswordPageModule } from './reset-new-password-page/reset-new-password-page.module'; <<<<<<< StoreListPageModule, ======= StoreDescriptionPageModule, ContactPageModule, SalePageModule, HelpPageModule, ResetNewPasswordPageModule, >>>>>>> StoreListPageModule, StoreDescriptionPageModule, ContactPageModule, SalePageModule, HelpPageModule, ResetNewPasswordPageModule, <<<<<<< StoreListPageModule, ======= StoreDescriptionPageModule, ContactPageModule, SalePageModule, HelpPageModule, ResetNewPasswordPageModule, >>>>>>> StoreListPageModule, StoreDescriptionPageModule, ContactPageModule, SalePageModule, HelpPageModule, ResetNewPasswordPageModule,
<<<<<<< SpinnerModule, StoreModule.forRoot({ ...fromRoot.getReducers(), stores: combineReducers(fromReducers.reducers) }), ======= StoreModule.forRoot({}), StoreModule.forFeature('stores', fromReducers.reducers), >>>>>>> SpinnerModule, StoreModule.forRoot({}), StoreModule.forFeature('stores', fromReducers.reducers),
<<<<<<< ), map((action: any) => action.payload), mergeMap(payload => { if (payload === undefined || payload.userId === undefined) { payload = { userId: this.cartData.userId, cartId: this.cartData.cartId, details: this.cartData.getDetails ? true : undefined }; } if (payload.userId === undefined || payload.cartId === undefined) { return of(new fromActions.LoadCartFail({})); } ======= ) .pipe( map((action: any) => action.payload), mergeMap(payload => { if (payload === undefined || payload.userId === undefined) { payload = { userId: this.cartData.userId, cartId: this.cartData.cartId, details: this.cartData.getDetails ? true : undefined }; } if (this.isAnonymousUser(payload)) { return of(); } if (this.isMissingData(payload)) { return of(new fromActions.LoadCartFail({})); } >>>>>>> ), map((action: any) => action.payload), mergeMap(payload => { if (payload === undefined || payload.userId === undefined) { payload = { userId: this.cartData.userId, cartId: this.cartData.cartId, details: this.cartData.getDetails ? true : undefined }; } if (this.isAnonymousUser(payload)) { return of(); } if (this.isMissingData(payload)) { return of(new fromActions.LoadCartFail({})); }
<<<<<<< this.store.dispatch( new fromGlobalMessage.AddMessage({ text: 'Logged In Successfully', type: GlobalMessageType.MSG_TYPE_CONFIRMATION }) ); this.store.dispatch( new fromGlobalMessage.RemoveMessagesByType( GlobalMessageType.MSG_TYPE_ERROR ) ); ======= >>>>>>> this.store.dispatch( new fromGlobalMessage.AddMessage({ text: 'Logged In Successfully', type: GlobalMessageType.MSG_TYPE_CONFIRMATION }) ); this.store.dispatch( new fromGlobalMessage.RemoveMessagesByType( GlobalMessageType.MSG_TYPE_ERROR ) );
<<<<<<< readonly tabs: ElementArrayFinder = this.page .element(by.tagName('ngb-tabset')) .all(by.css('li')); ======= readonly productPrice: ElementFinder = this.productSummaryComponent.element( by.css('.y-product-summary__price') ); >>>>>>> readonly tabs: ElementArrayFinder = this.page .element(by.tagName('ngb-tabset')) .all(by.css('li')); readonly productPrice: ElementFinder = this.productSummaryComponent.element( by.css('.y-product-summary__price') );
<<<<<<< import { AuthModuleConfig, OccConfig, RoutingModuleConfig } from '@spartacus/core'; ======= import { OccConfig, RoutingModuleConfig, ConfigurableRoutesConfig } from '@spartacus/core'; >>>>>>> import { AuthModuleConfig, OccConfig, RoutingModuleConfig, ConfigurableRoutesConfig } from '@spartacus/core';
<<<<<<< import { PWAModuleConfig, defaultPWAModuleConfig } from '../../../pwa/pwa.module-config'; import { PwaModule } from '../../../pwa/pwa.module'; ======= import { SiteContextConfig } from '@spartacus/core'; >>>>>>> import { PWAModuleConfig, defaultPWAModuleConfig } from '../../../pwa/pwa.module-config'; import { PwaModule } from '../../../pwa/pwa.module'; import { SiteContextConfig } from '@spartacus/core'; <<<<<<< GlobalMessageModule, PwaModule ======= EffectsModule.forRoot([]), GlobalMessageModule, SiteContextModule >>>>>>> GlobalMessageModule, PwaModule, EffectsModule.forRoot([]), SiteContextModule
<<<<<<< it('should display empty cart if no items added and when items are removed', async () => { // Go to cart await cart.navigateTo(); let cartPageText = await cart.page.getText(); expect(cartPageText).toContain('Your shopping cart is empty'); expect(cartPageText).toContain('Suggestions'); expect(cartPageText).toContain( 'Browse our products by selecting a category above' ); await productDetails.navigateTo('300938'); await productDetails.addToCartButton.click(); const atcModal: AddedToCartModal = new AddedToCartModal(); await atcModal.waitForReady(); const item = atcModal.item; await E2EUtil.wait4VisibleElement(item); await atcModal.closeButton.click(); // Go to cart const minicartIcon = home.header.miniCartButton; await E2EUtil.wait4VisibleElement(minicartIcon); await minicartIcon.click(); // wait for cart page to show up await cart.waitForReady(); // Check if cart contains correct product await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 1, '$114.12', '$114.12' ); await cart.deleteEntryByName('Photosmart E317 Digital Camera'); await E2EUtil.wait4TextInElement(cart.page, 'Your shopping cart is empty'); cartPageText = await cart.page.getText(); expect(cartPageText).toContain('Your shopping cart is empty'); expect(cartPageText).toContain('Suggestions'); expect(cartPageText).toContain( 'Browse our products by selecting a category above' ); }); it('should add product to cart as anonymous and merge when logged in', async () => { ======= it('should be unable to add out of stock products to cart', async () => { // go to homepage >>>>>>> it('should display empty cart if no items added and when items are removed', async () => { // Go to cart await cart.navigateTo(); let cartPageText = await cart.page.getText(); expect(cartPageText).toContain('Your shopping cart is empty'); expect(cartPageText).toContain('Suggestions'); expect(cartPageText).toContain( 'Browse our products by selecting a category above' ); await productDetails.navigateTo('300938'); await productDetails.addToCartButton.click(); const atcModal: AddedToCartModal = new AddedToCartModal(); await atcModal.waitForReady(); const item = atcModal.item; await E2EUtil.wait4VisibleElement(item); await atcModal.closeButton.click(); // Go to cart const minicartIcon = home.header.miniCartButton; await E2EUtil.wait4VisibleElement(minicartIcon); await minicartIcon.click(); // wait for cart page to show up await cart.waitForReady(); // Check if cart contains correct product await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 1, '$114.12', '$114.12' ); await cart.deleteEntryByName('Photosmart E317 Digital Camera'); await E2EUtil.wait4TextInElement(cart.page, 'Your shopping cart is empty'); cartPageText = await cart.page.getText(); expect(cartPageText).toContain('Your shopping cart is empty'); expect(cartPageText).toContain('Suggestions'); expect(cartPageText).toContain( 'Browse our products by selecting a category above' ); }); it('should add product to cart as anonymous and merge when logged in', async () => { <<<<<<< await atcModal.closeButton.click(); // Log out. await LoginHelper.logOutViaHeader(); // Check that we are not logged in expect(await home.header.isLoggedIn()).toBeFalsy(); // select product from the suggestion list, then add it to cart 2 times await home.header.performSearch('358639', true); await autocompletePanel.selectProduct('DSC-N1'); // wait until product details page is loaded await productDetails.waitForReady(); await productDetails.addToCart(); atcModal = new AddedToCartModal(); await atcModal.waitForReady(); await atcModal.closeButton.click(); await LoginHelper.loginUserViaHeader(email, password); // Go to cart const minicartIcon = home.header.miniCartButton; await E2EUtil.wait4VisibleElement(minicartIcon); await minicartIcon.click(); await cart.waitForReady(); // Check if cart contains correct products await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 1, '$114.12', '$114.12' ); await cart.checkCartEntry('DSC-N1', 1, '$485.57', '$485.57'); }); it('should add product to cart as anonymous and merge when logged in', async () => { // Add product to cart await productDetails.navigateTo('300938'); await productDetails.addToCartButton.click(); const atcModal: AddedToCartModal = new AddedToCartModal(); await atcModal.waitForReady(); const item = await atcModal.item; await E2EUtil.wait4VisibleElement(item); await atcModal.closeButton.click(); // Check that we are not logged in expect(await home.header.isLoggedIn()).toBeFalsy(); // Let's register await LoginHelper.registerNewUser(); expect(await home.header.isLoggedIn()).toBeTruthy(); expect(await home.header.loginComponent.getText()).toContain( USER_FULL_NAME ); // Go to cart await cart.navigateTo(); // Check if cart contains correct product await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 1, '$114.12', '$114.12' ); }); it('should add product to cart and manipulate qty', async () => { // go to homepage await productDetails.navigateTo('300938'); await productDetails.addToCartButton.click(); const atcModal: AddedToCartModal = new AddedToCartModal(); await atcModal.waitForReady(); const item = await atcModal.item; await E2EUtil.wait4VisibleElement(item); await atcModal.closeButton.click(); const minicartIcon = home.header.miniCartButton; await E2EUtil.wait4VisibleElement(minicartIcon); await minicartIcon.click(); // wait for cart page to show up await cart.waitForReady(); // Change cart qty await cart.increaseQty(0); await E2EUtil.wait4TextInElement(cart.orderSummaryAmount, '228.24'); await cart.increaseQty(0); await E2EUtil.wait4TextInElement(cart.orderSummaryAmount, '342.36'); // check if cart contains quantity 3 of 'Photosmart E317 Digital Camera' await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 3, '$114.12', '$342.36' ); }); // TODO: We need that product on backend to be out of stock xit('should be unable to add out of stock products to cart', async () => { await productDetails.navigateTo('358639'); ======= await productDetails.navigateTo('29925'); >>>>>>> await atcModal.closeButton.click(); // Log out. await LoginHelper.logOutViaHeader(); // Check that we are not logged in expect(await home.header.isLoggedIn()).toBeFalsy(); // select product from the suggestion list, then add it to cart 2 times await home.header.performSearch('358639', true); await autocompletePanel.selectProduct('DSC-N1'); // wait until product details page is loaded await productDetails.waitForReady(); await productDetails.addToCart(); atcModal = new AddedToCartModal(); await atcModal.waitForReady(); await atcModal.closeButton.click(); await LoginHelper.loginUserViaHeader(email, password); // Go to cart const minicartIcon = home.header.miniCartButton; await E2EUtil.wait4VisibleElement(minicartIcon); await minicartIcon.click(); await cart.waitForReady(); // Check if cart contains correct products await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 1, '$114.12', '$114.12' ); await cart.checkCartEntry('DSC-N1', 1, '$485.57', '$485.57'); }); it('should add product to cart as anonymous and merge when logged in', async () => { // Add product to cart await productDetails.navigateTo('300938'); await productDetails.addToCartButton.click(); const atcModal: AddedToCartModal = new AddedToCartModal(); await atcModal.waitForReady(); const item = await atcModal.item; await E2EUtil.wait4VisibleElement(item); await atcModal.closeButton.click(); // Check that we are not logged in expect(await home.header.isLoggedIn()).toBeFalsy(); // Let's register await LoginHelper.registerNewUser(); expect(await home.header.isLoggedIn()).toBeTruthy(); expect(await home.header.loginComponent.getText()).toContain( USER_FULL_NAME ); // Go to cart await cart.navigateTo(); // Check if cart contains correct product await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 1, '$114.12', '$114.12' ); }); it('should add product to cart and manipulate qty', async () => { // go to homepage await productDetails.navigateTo('300938'); await productDetails.addToCartButton.click(); const atcModal: AddedToCartModal = new AddedToCartModal(); await atcModal.waitForReady(); const item = await atcModal.item; await E2EUtil.wait4VisibleElement(item); await atcModal.closeButton.click(); const minicartIcon = home.header.miniCartButton; await E2EUtil.wait4VisibleElement(minicartIcon); await minicartIcon.click(); // wait for cart page to show up await cart.waitForReady(); // Change cart qty await cart.increaseQty(0); await E2EUtil.wait4TextInElement(cart.orderSummaryAmount, '228.24'); await cart.increaseQty(0); await E2EUtil.wait4TextInElement(cart.orderSummaryAmount, '342.36'); // check if cart contains quantity 3 of 'Photosmart E317 Digital Camera' await cart.checkCartEntry( 'Photosmart E317 Digital Camera', 3, '$114.12', '$342.36' ); }); // TODO: We need that product on backend to be out of stock it('should be unable to add out of stock products to cart', async () => { await productDetails.navigateTo('29925');
<<<<<<< ======= import { LoginComponent } from './login.component'; >>>>>>> <<<<<<< import { AuthService } from '../../../auth/facade/auth.service'; import { UserToken } from './../../../auth/models/token-types.model'; import { LoginComponent } from './login.component'; class MockAuthService { login = createSpy(); logout = createSpy(); getUserToken(): Observable<UserToken> { return of(); } } class MockRoutingService { go = createSpy(); } class MockUserService { user$ = new BehaviorSubject(null); loadUserDetails = createSpy(); } ======= import { AuthService, RoutingService, UserToken } from '@spartacus/core'; >>>>>>> import { LoginComponent } from './login.component'; class MockAuthService { login = createSpy(); logout = createSpy(); getUserToken(): Observable<UserToken> { return of(); } } class MockRoutingService { go = createSpy(); } class MockUserService { user$ = new BehaviorSubject(null); loadUserDetails = createSpy(); }
<<<<<<< ======= import { AuthService, Cart, OrderEntry, UserToken } from '@spartacus/core'; >>>>>>>