conflict_resolution
stringlengths
27
16k
<<<<<<< import * as zowe from "@zowe/cli"; import { Session } from "@zowe/imperative"; ======= import * as zowe from "@brightside/core"; import { Session, IProfileLoaded } from "@brightside/imperative"; // tslint:disable-next-line: no-duplicate-imports import { IJob, IJobFile } from "@brightside/core"; >>>>>>> import * as zowe from "@zowe/cli"; import { Session, IProfileLoaded } from "@zowe/imperative"; <<<<<<< constructor(public label: string, public mCollapsibleState: vscode.TreeItemCollapsibleState, public mParent: Job, public session: Session, public job: zowe.IJob) { super(label, mCollapsibleState); ======= constructor(label: string, collapsibleState: vscode.TreeItemCollapsibleState, mParent: IZoweJobTreeNode, session: Session, public job: IJob, profile: IProfileLoaded) { super(label, collapsibleState, mParent, session, profile); >>>>>>> constructor(label: string, collapsibleState: vscode.TreeItemCollapsibleState, mParent: IZoweJobTreeNode, session: Session, public job: zowe.IJob, profile: IProfileLoaded) { super(label, collapsibleState, mParent, session, profile); <<<<<<< private async getJobs(session, owner, prefix, searchId): Promise<zowe.IJob[]> { ======= private async getJobs(owner, prefix, searchId): Promise<IJob[]> { >>>>>>> private async getJobs(owner, prefix, searchId): Promise<zowe.IJob[]> { <<<<<<< constructor(public label: string, public mCollapsibleState: vscode.TreeItemCollapsibleState, public mParent: Job, public session: Session, public spool: zowe.IJobFile, public job: zowe.IJob, public parent: Job) { super(label, mCollapsibleState, mParent, session, job); ======= constructor(label: string, mCollapsibleState: vscode.TreeItemCollapsibleState, mParent: IZoweJobTreeNode, session: Session, spool: IJobFile, job: IJob, parent: IZoweJobTreeNode) { super(label, mCollapsibleState, mParent, session, job, parent.getProfile()); >>>>>>> constructor(label: string, mCollapsibleState: vscode.TreeItemCollapsibleState, mParent: IZoweJobTreeNode, session: Session, spool: zowe.IJobFile, job: zowe.IJob, parent: IZoweJobTreeNode) { super(label, mCollapsibleState, mParent, session, job, parent.getProfile());
<<<<<<< Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName"}, {name: "secondName"}], defaultProfile: {name: "firstName"}, getDefaultProfile: mockLoadNamedProfile, loadNamedProfile: mockLoadNamedProfile, promptCredentials: jest.fn(), usesSecurity: true, getProfiles: jest.fn(), refresh: jest.fn(), }; }) }); ======= >>>>>>> Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName"}, {name: "secondName"}], defaultProfile: {name: "firstName"}, getDefaultProfile: mockLoadNamedProfile, loadNamedProfile: mockLoadNamedProfile, promptCredentials: jest.fn(), usesSecurity: true, getProfiles: jest.fn(), refresh: jest.fn(), }; }) });
<<<<<<< import { IZoweTree } from "../api/IZoweTree"; import { IZoweTreeNode, IZoweUSSTreeNode } from "../api/IZoweTreeNode"; ======= import { ZoweExplorerApiRegister } from "../api/ZoweExplorerApiRegister"; >>>>>>> import { IZoweTree } from "../api/IZoweTree"; import { IZoweUSSTreeNode } from "../api/IZoweTreeNode"; import { ZoweExplorerApiRegister } from "../api/ZoweExplorerApiRegister"; <<<<<<< ======= export async function deleteUSSNode(node: ZoweUSSNode, ussFileProvider: USSTree, filePath: string) { const quickPickOptions: vscode.QuickPickOptions = { placeHolder: localize("deleteUSSNode.quickPickOption", "Are you sure you want to delete ") + node.label, ignoreFocusOut: true, canPickMany: false }; if (await vscode.window.showQuickPick([localize("deleteUSSNode.showQuickPick.yes", "Yes"), localize("deleteUSSNode.showQuickPick.no", "No")], quickPickOptions) !== localize("deleteUSSNode.showQuickPick.yes", "Yes")) { return; } try { const isRecursive = node.contextValue === extension.USS_DIR_CONTEXT ? true : false; await ZoweExplorerApiRegister.getUssApi(node.profile).delete(node.fullPath, isRecursive); node.mParent.dirty = true; deleteFromDisk(node, filePath); } catch (err) { const errMessage: string = localize("deleteUSSNode.error.node", "Unable to delete node: ") + err.message; utils.errorHandling(err, node.mProfileName, errMessage); throw (err); } // Remove node from the USS Favorites tree ussFileProvider.removeUSSFavorite(node); ussFileProvider.refresh(); } >>>>>>>
<<<<<<< const withProgress = jest.fn(); const downloadDataset = jest.fn(); const downloadUSSFile = jest.fn(); ======= const mockInitialize = jest.fn(); const mockInitializeUSS = jest.fn(); const ussPattern = jest.fn(); const mockPattern = jest.fn(); >>>>>>> const withProgress = jest.fn(); const downloadDataset = jest.fn(); const downloadUSSFile = jest.fn(); const mockInitialize = jest.fn(); const mockInitializeUSS = jest.fn(); const ussPattern = jest.fn(); const mockPattern = jest.fn();
<<<<<<< node.label = `${favPrefix}${afterDataSetName}`; if (isFavourite) { const profile = favPrefix.substring(1, favPrefix.indexOf("]")); datasetProvider.renameNode(profile, beforeDataSetName, afterDataSetName); } else { const temp = node.label; node.label = "[" + node.getSessionNode().label.trim() + "]: " + beforeDataSetName; datasetProvider.renameFavorite(node, afterDataSetName); node.label = temp; } datasetProvider.refreshElement(node); ======= node.label = favPrefix ? `${favPrefix}${afterDataSetName}` : afterDataSetName; >>>>>>> node.label = `${favPrefix}${afterDataSetName}`; if (isFavourite) { const profile = favPrefix.substring(1, favPrefix.indexOf("]")); datasetProvider.renameNode(profile, beforeDataSetName, afterDataSetName); } else { const temp = node.label; node.label = "[" + node.getSessionNode().label.trim() + "]: " + beforeDataSetName; datasetProvider.renameFavorite(node, afterDataSetName); node.label = temp; } datasetProvider.refreshElement(node); datasetProvider.updateFavorites(); if (fs.existsSync(beforeFullPath)) { fs.unlinkSync(beforeFullPath); } if (closedOpenedInstance) { vscode.commands.executeCommand("zowe.ZoweNode.openPS", node); } <<<<<<< ======= if (isFavourite) { const profile = favPrefix.substring(1, favPrefix.indexOf("]")); datasetProvider.renameNode(profile, beforeDataSetName, afterDataSetName); } else { const temp = node.label; node.label = "[" + node.getSessionNode().label.trim() + "]: " + beforeDataSetName; datasetProvider.renameFavorite(node, afterDataSetName); node.label = temp; } datasetProvider.refreshElement(node); datasetProvider.updateFavorites(); if (fs.existsSync(beforeFullPath)) { fs.unlinkSync(beforeFullPath); } if (closedOpenedInstance) { vscode.commands.executeCommand("zowe.ZoweNode.openPS", node); } >>>>>>> <<<<<<< node.label = afterMemberName; ======= node.label = profileLabel ? `${profileLabel}${afterMemberName}` : afterMemberName; >>>>>>> node.label = afterMemberName; <<<<<<< datasetProvider.refreshElement(node); ======= datasetProvider.refreshElement(node.getParent()); if (fs.existsSync(beforeFullPath)) { fs.unlinkSync(beforeFullPath); } if (closedOpenedInstance) { vscode.commands.executeCommand("zowe.ZoweNode.openPS", node); } >>>>>>> datasetProvider.refreshElement(node); if (fs.existsSync(beforeFullPath)) { fs.unlinkSync(beforeFullPath); } if (closedOpenedInstance) { vscode.commands.executeCommand("zowe.ZoweNode.openPS", node); }
<<<<<<< ======= import { Logger, ISession, Session } from "@brightside/imperative"; import * as child_process from "child_process"; >>>>>>> <<<<<<< import * as loader from "../../src/ProfileLoader"; ======= import { ZosmfSession } from "@brightside/core"; >>>>>>> import * as loader from "../../src/ProfileLoader"; import { ZosmfSession } from "@zowe/cli";
<<<<<<< if (node) { node.setEtag(uploadResponse.apiResponse.etag); } ======= node.setEtag(uploadResponse.apiResponse.etag); setFileSaved(true); >>>>>>> if (node) { node.setEtag(uploadResponse.apiResponse.etag); } setFileSaved(true);
<<<<<<< import { getInstallPath } from '../../util/api'; import { UserCanceled } from '../../util/CustomErrors'; ======= import { ProcessCanceled, UserCanceled } from '../../util/CustomErrors'; >>>>>>> import { getInstallPath } from '../../util/api'; import { ProcessCanceled, UserCanceled } from '../../util/CustomErrors';
<<<<<<< import { ZosmfSession, IJob, DeleteJobs } from "@brightside/core"; ======= import { ZosmfSession, IJob } from "@brightside/core"; >>>>>>> import { ZosmfSession, IJob, DeleteJobs } from "@brightside/core"; <<<<<<< super(ZosJobsProvider.persistenceSchema, new Job(localize("Favorites", "Favorites"), vscode.TreeItemCollapsibleState.Collapsed, null, null, null)); this.mFavoriteSession = new Job(localize("Favorites", "Favorites"),vscode.TreeItemCollapsibleState.Collapsed, null, null, null); ======= this.mFavoriteSession = new Job(localize("FavoriteSession", "Favorites"), vscode.TreeItemCollapsibleState.Collapsed, null, null, null, null); >>>>>>> super(ZosJobsProvider.persistenceSchema, new Job(localize("Favorites", "Favorites"), vscode.TreeItemCollapsibleState.Collapsed, null, null, null, null)); <<<<<<< await DeleteJobs.deleteJob(node.getSession(), node.job.jobname, node.job.jobid); ======= await ZoweExplorerApiRegister.getJesApi(node.profile).deleteJob(node.job.jobname, node.job.jobid); >>>>>>> await ZoweExplorerApiRegister.getJesApi(node.getProfile()).deleteJob(node.job.jobname, node.job.jobid); <<<<<<< vscode.TreeItemCollapsibleState.None, node.getParent(), node.getSession(), node.job); ======= vscode.TreeItemCollapsibleState.None, node.mParent, node.session, node.job, node.profile); >>>>>>> vscode.TreeItemCollapsibleState.None, node.getParent(), node.getSession(), node.job, node.getProfile()); <<<<<<< vscode.TreeItemCollapsibleState.Collapsed, node.getParent(), node.getSession(), node.job); ======= vscode.TreeItemCollapsibleState.Collapsed, node.mParent, node.session, node.job, node.profile); >>>>>>> vscode.TreeItemCollapsibleState.Collapsed, node.getParent(), node.getSession(), node.job, node.getProfile()); <<<<<<< // Creates ZoweDatasetNode to track new session and pushes it to mSessionNodes const node = new Job(zosmfProfile.name, vscode.TreeItemCollapsibleState.Collapsed, null, session, null); ======= // Creates ZoweNode to track new session and pushes it to mSessionNodes const node = new Job(zosmfProfile.name, vscode.TreeItemCollapsibleState.Collapsed, null, session, null, zosmfProfile); >>>>>>> // Creates ZoweNode to track new session and pushes it to mSessionNodes const node = new Job(zosmfProfile.name, vscode.TreeItemCollapsibleState.Collapsed, null, session, null, zosmfProfile);
<<<<<<< }); /************************************************************************************************************* * Testing openItemFromPath *************************************************************************************************************/ describe("openItemFromPath tests", () => { const session = new Session({ user: "fake", password: "fake", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const profileOne: IProfileLoaded = { name: "aProfile", profile: {}, type: "zosmf", message: "", failNotFound: false }; const testTree = new DatasetTree(); const sessionNode = new ZoweDatasetNode("testSess", vscode.TreeItemCollapsibleState.Collapsed, null, session, undefined, undefined, profileOne); sessionNode.contextValue = extension.DS_SESSION_CONTEXT; sessionNode.pattern = "test"; const pdsNode = new ZoweDatasetNode("TEST.PDS", vscode.TreeItemCollapsibleState.Collapsed, sessionNode, null); const member = new ZoweDatasetNode("TESTMEMB", vscode.TreeItemCollapsibleState.None, pdsNode, null); const dsNode = new ZoweDatasetNode("TEST.DS", vscode.TreeItemCollapsibleState.Collapsed, sessionNode, null); dsNode.contextValue = extension.DS_DS_CONTEXT; beforeEach(async () => { pdsNode.children = [member]; sessionNode.children = [pdsNode, dsNode]; testTree.mSessionNodes = [sessionNode]; }); it("Should open a DS in the tree", async () => { spyOn(sessionNode, "getChildren").and.returnValue(Promise.resolve([dsNode])); await testTree.openItemFromPath("[testSess]: TEST.DS", sessionNode); expect(testTree.getHistory().includes("TEST.DS")).toBe(true); }); it("Should open a member in the tree", async () => { spyOn(sessionNode, "getChildren").and.returnValue(Promise.resolve([pdsNode])); spyOn(pdsNode, "getChildren").and.returnValue(Promise.resolve([member])); await testTree.openItemFromPath("[testSess]: TEST.PDS(TESTMEMB)", sessionNode); expect(testTree.getHistory().includes("TEST.PDS(TESTMEMB)")).toBe(true); }); ======= describe("Renaming Data Sets", () => { const existsSync = jest.fn(); Object.defineProperty(fs, "existsSync", {value: existsSync}); extension.defineGlobals(undefined); const sessionRename = new Session({ user: "fake", password: "fake", base64EncodedAuth: "fake", }); createBasicZosmfSession.mockReturnValue(sessionRename); it("Should rename the node", async () => { showInputBox.mockReset(); renameDataSet.mockReset(); const child = new ZoweDatasetNode("HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); showInputBox.mockResolvedValueOnce("HLQ.TEST.RENAME.NODE.NEW"); await testTree.rename(child); expect(renameDataSet.mock.calls.length).toBe(1); expect(renameDataSet).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "HLQ.TEST.RENAME.NODE.NEW"); }); it("Should rename a favorited node", async () => { showInputBox.mockReset(); renameDataSet.mockReset(); const child = new ZoweDatasetNode("[sessNode]: HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); child.contextValue = "ds_fav"; showInputBox.mockResolvedValueOnce("HLQ.TEST.RENAME.NODE.NEW"); await testTree.rename(child); expect(renameDataSet.mock.calls.length).toBe(1); expect(renameDataSet).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "HLQ.TEST.RENAME.NODE.NEW"); }); it("Should throw an error if zowe.Rename.dataSet throws", async () => { let error; const defaultError = new Error("Default error message"); showInputBox.mockReset(); renameDataSet.mockReset(); renameDataSet.mockImplementation(() => { throw defaultError; }); const child = new ZoweDatasetNode("[sessNode]: HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); child.contextValue = "ds_fav"; showInputBox.mockResolvedValueOnce("HLQ.TEST.RENAME.NODE.NEW"); try { await testTree.rename(child); } catch (err) { error = err; } expect(renameDataSet.mock.calls.length).toBe(1); expect(renameDataSet).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "HLQ.TEST.RENAME.NODE.NEW"); expect(error).toBe(defaultError); }); it("Should rename the member", async () => { showInputBox.mockReset(); renameDataSetMember.mockReset(); const parent = new ZoweDatasetNode("HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); const child = new ZoweDatasetNode("mem1", vscode.TreeItemCollapsibleState.None, parent, sessionRename); showInputBox.mockResolvedValueOnce("mem2"); await testTree.rename(child); expect(renameDataSetMember.mock.calls.length).toBe(1); expect(renameDataSetMember).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "mem1", "mem2"); }); it("Should rename a favorited member", async () => { showInputBox.mockReset(); renameDataSetMember.mockReset(); const parent = new ZoweDatasetNode("[testSess]: HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); const child = new ZoweDatasetNode("mem1", vscode.TreeItemCollapsibleState.None, parent, sessionRename); parent.contextValue = extension.DS_PDS_CONTEXT + extension.FAV_SUFFIX; child.contextValue = extension.DS_MEMBER_CONTEXT; showInputBox.mockResolvedValueOnce("mem2"); await testTree.rename(child); expect(renameDataSetMember.mock.calls.length).toBe(1); expect(renameDataSetMember).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "mem1", "mem2"); }); it("Should throw an error if zowe.Rename.dataSetMember throws", async () => { let error; const defaultError = new Error("Default error message"); showInputBox.mockReset(); renameDataSetMember.mockReset(); renameDataSetMember.mockImplementation(() => { throw defaultError; }); const parent = new ZoweDatasetNode("HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); const child = new ZoweDatasetNode("mem1", vscode.TreeItemCollapsibleState.None, parent, sessionRename); child.contextValue = extension.DS_MEMBER_CONTEXT; showInputBox.mockResolvedValueOnce("mem2"); try { await testTree.rename(child); } catch (err) { error = err; } expect(renameDataSetMember.mock.calls.length).toBe(1); expect(renameDataSetMember).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "mem1", "mem2"); expect(error).toBe(defaultError); }); }); >>>>>>> describe("Renaming Data Sets", () => { const existsSync = jest.fn(); Object.defineProperty(fs, "existsSync", {value: existsSync}); extension.defineGlobals(undefined); const sessionRename = new Session({ user: "fake", password: "fake", base64EncodedAuth: "fake", }); createBasicZosmfSession.mockReturnValue(sessionRename); it("Should rename the node", async () => { showInputBox.mockReset(); renameDataSet.mockReset(); const child = new ZoweDatasetNode("HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); showInputBox.mockResolvedValueOnce("HLQ.TEST.RENAME.NODE.NEW"); await testTree.rename(child); expect(renameDataSet.mock.calls.length).toBe(1); expect(renameDataSet).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "HLQ.TEST.RENAME.NODE.NEW"); }); it("Should rename a favorited node", async () => { showInputBox.mockReset(); renameDataSet.mockReset(); const child = new ZoweDatasetNode("[sessNode]: HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); child.contextValue = "ds_fav"; showInputBox.mockResolvedValueOnce("HLQ.TEST.RENAME.NODE.NEW"); await testTree.rename(child); expect(renameDataSet.mock.calls.length).toBe(1); expect(renameDataSet).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "HLQ.TEST.RENAME.NODE.NEW"); }); it("Should throw an error if zowe.Rename.dataSet throws", async () => { let error; const defaultError = new Error("Default error message"); showInputBox.mockReset(); renameDataSet.mockReset(); renameDataSet.mockImplementation(() => { throw defaultError; }); const child = new ZoweDatasetNode("[sessNode]: HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); child.contextValue = "ds_fav"; showInputBox.mockResolvedValueOnce("HLQ.TEST.RENAME.NODE.NEW"); try { await testTree.rename(child); } catch (err) { error = err; } expect(renameDataSet.mock.calls.length).toBe(1); expect(renameDataSet).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "HLQ.TEST.RENAME.NODE.NEW"); expect(error).toBe(defaultError); }); it("Should rename the member", async () => { showInputBox.mockReset(); renameDataSetMember.mockReset(); const parent = new ZoweDatasetNode("HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); const child = new ZoweDatasetNode("mem1", vscode.TreeItemCollapsibleState.None, parent, sessionRename); showInputBox.mockResolvedValueOnce("mem2"); await testTree.rename(child); expect(renameDataSetMember.mock.calls.length).toBe(1); expect(renameDataSetMember).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "mem1", "mem2"); }); it("Should rename a favorited member", async () => { showInputBox.mockReset(); renameDataSetMember.mockReset(); const parent = new ZoweDatasetNode("[testSess]: HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); const child = new ZoweDatasetNode("mem1", vscode.TreeItemCollapsibleState.None, parent, sessionRename); parent.contextValue = extension.DS_PDS_CONTEXT + extension.FAV_SUFFIX; child.contextValue = extension.DS_MEMBER_CONTEXT; showInputBox.mockResolvedValueOnce("mem2"); await testTree.rename(child); expect(renameDataSetMember.mock.calls.length).toBe(1); expect(renameDataSetMember).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "mem1", "mem2"); }); it("Should throw an error if zowe.Rename.dataSetMember throws", async () => { let error; const defaultError = new Error("Default error message"); showInputBox.mockReset(); renameDataSetMember.mockReset(); renameDataSetMember.mockImplementation(() => { throw defaultError; }); const parent = new ZoweDatasetNode("HLQ.TEST.RENAME.NODE", vscode.TreeItemCollapsibleState.None, testTree.mSessionNodes[1], sessionRename); const child = new ZoweDatasetNode("mem1", vscode.TreeItemCollapsibleState.None, parent, sessionRename); child.contextValue = extension.DS_MEMBER_CONTEXT; showInputBox.mockResolvedValueOnce("mem2"); try { await testTree.rename(child); } catch (err) { error = err; } expect(renameDataSetMember.mock.calls.length).toBe(1); expect(renameDataSetMember).toHaveBeenLastCalledWith(child.getSession(), "HLQ.TEST.RENAME.NODE", "mem1", "mem2"); expect(error).toBe(defaultError); }); }); }); /************************************************************************************************************* * Testing openItemFromPath *************************************************************************************************************/ describe("openItemFromPath tests", () => { const session = new Session({ user: "fake", password: "fake", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const profileOne: IProfileLoaded = { name: "aProfile", profile: {}, type: "zosmf", message: "", failNotFound: false }; const testTree = new DatasetTree(); const sessionNode = new ZoweDatasetNode("testSess", vscode.TreeItemCollapsibleState.Collapsed, null, session, undefined, undefined, profileOne); sessionNode.contextValue = extension.DS_SESSION_CONTEXT; sessionNode.pattern = "test"; const pdsNode = new ZoweDatasetNode("TEST.PDS", vscode.TreeItemCollapsibleState.Collapsed, sessionNode, null); const member = new ZoweDatasetNode("TESTMEMB", vscode.TreeItemCollapsibleState.None, pdsNode, null); const dsNode = new ZoweDatasetNode("TEST.DS", vscode.TreeItemCollapsibleState.Collapsed, sessionNode, null); dsNode.contextValue = extension.DS_DS_CONTEXT; beforeEach(async () => { pdsNode.children = [member]; sessionNode.children = [pdsNode, dsNode]; testTree.mSessionNodes = [sessionNode]; }); it("Should open a DS in the tree", async () => { spyOn(sessionNode, "getChildren").and.returnValue(Promise.resolve([dsNode])); await testTree.openItemFromPath("[testSess]: TEST.DS", sessionNode); expect(testTree.getHistory().includes("TEST.DS")).toBe(true); }); it("Should open a member in the tree", async () => { spyOn(sessionNode, "getChildren").and.returnValue(Promise.resolve([pdsNode])); spyOn(pdsNode, "getChildren").and.returnValue(Promise.resolve([member])); await testTree.openItemFromPath("[testSess]: TEST.PDS(TESTMEMB)", sessionNode); expect(testTree.getHistory().includes("TEST.PDS(TESTMEMB)")).toBe(true); });
<<<<<<< // Could be a favorite or regular entry always deal with the regular entry const oldLabel = originalNode.label; const parentPath = originalNode.fullPath.substr(0, originalNode.fullPath.indexOf(oldLabel)); // Check if an old favorite exists for this node const oldFavorite: IZoweUSSTreeNode = contextually.isFavorite(originalNode) ? originalNode : this.mFavorites.find((temp: ZoweUSSNode) => (temp.shortLabel === oldLabel) && (temp.fullPath.substr(0, temp.fullPath.indexOf(oldLabel)) === parentPath) ); const nodeType = contextually.isFolder(originalNode) ? "folder" : "file"; const loadedNodes = await this.getAllLoadedItems(); const options: vscode.InputBoxOptions = { prompt: localize("renameUSSNode.enterName", "Enter a new name for the {0}", nodeType), value: oldLabel.replace(/^\[.+\]:\s/, ""), ignoreFocusOut: true, validateInput: (value) => this.checkDuplicateLabel(value, loadedNodes, nodeType) }; const newName = await vscode.window.showInputBox(options); if (newName && newName !== oldLabel) { try { let newNamePath = path.join(parentPath + newName); newNamePath = newNamePath.replace(/\\/g, "/"); // Added to cover Windows backslash issue const oldNamePath = originalNode.fullPath; const hasClosedTab = await originalNode.rename(newNamePath); await ZoweExplorerApiRegister.getUssApi( originalNode.getProfile()).rename(oldNamePath, newNamePath); await originalNode.refreshAndReopen(hasClosedTab); if (oldFavorite) { this.removeFavorite(oldFavorite); oldFavorite.rename(newNamePath); this.addFavorite(oldFavorite); } } catch (err) { errorHandling(err, originalNode.mProfileName, localize("renameUSSNode.error", "Unable to rename node: ") + err.message); throw (err); ======= // Could be a favorite or regular entry always deal with the regular entry const oldLabel = originalNode.label; const parentPath = originalNode.fullPath.substr(0, originalNode.fullPath.indexOf(oldLabel)); // Check if an old favorite exists for this node const oldFavorite: IZoweUSSTreeNode = contextually.isFavorite(originalNode) ? originalNode : this.mFavorites.find((temp: ZoweUSSNode) => (temp.shortLabel === oldLabel) && (temp.fullPath.substr(0, temp.fullPath.indexOf(oldLabel)) === parentPath) ); const loadedNodes = await this.getAllLoadedItems(); const nodeType = contextually.isFolder(originalNode) ? "folder" : "file"; const options: vscode.InputBoxOptions = { prompt: localize("renameUSSNode.enterName", "Enter a new name for the {0}", nodeType), value: oldLabel.replace(/^\[.+\]:\s/, ""), ignoreFocusOut: true, validateInput: (value) => { for (const node of loadedNodes) { if (value === node.label.trim() && contextually.isFolder(node)) { return localize("renameUSSNode.duplicateName", "A {0} already exists with this name. Please choose a different one.", nodeType); } } return null; } }; const newName = await vscode.window.showInputBox(options); if (newName && newName !== oldLabel) { try { let newNamePath = path.join(parentPath + newName); newNamePath = newNamePath.replace(/\\/g, "/"); // Added to cover Windows backslash issue const oldNamePath = originalNode.fullPath; const hasClosedTab = await originalNode.rename(newNamePath); await ZoweExplorerApiRegister.getUssApi( originalNode.getProfile()).rename(oldNamePath, newNamePath); await originalNode.refreshAndReopen(hasClosedTab); if (oldFavorite) { this.removeFavorite(oldFavorite); oldFavorite.rename(newNamePath); this.addFavorite(oldFavorite); } } catch (err) { errorHandling(err, originalNode.mProfileName, localize("renameUSSNode.error", "Unable to rename node: ") + err.message); throw (err); >>>>>>> // Could be a favorite or regular entry always deal with the regular entry const oldLabel = originalNode.label; const parentPath = originalNode.fullPath.substr(0, originalNode.fullPath.indexOf(oldLabel)); // Check if an old favorite exists for this node const oldFavorite: IZoweUSSTreeNode = contextually.isFavorite(originalNode) ? originalNode : this.mFavorites.find((temp: ZoweUSSNode) => (temp.shortLabel === oldLabel) && (temp.fullPath.substr(0, temp.fullPath.indexOf(oldLabel)) === parentPath) ); const loadedNodes = await this.getAllLoadedItems(); const nodeType = contextually.isFolder(originalNode) ? "folder" : "file"; const options: vscode.InputBoxOptions = { prompt: localize("renameUSSNode.enterName", "Enter a new name for the {0}", nodeType), value: oldLabel.replace(/^\[.+\]:\s/, ""), ignoreFocusOut: true, validateInput: (value) => this.checkDuplicateLabel(value, loadedNodes, nodeType) }; const newName = await vscode.window.showInputBox(options); if (newName && newName !== oldLabel) { try { let newNamePath = path.join(parentPath + newName); newNamePath = newNamePath.replace(/\\/g, "/"); // Added to cover Windows backslash issue const oldNamePath = originalNode.fullPath; const hasClosedTab = await originalNode.rename(newNamePath); await ZoweExplorerApiRegister.getUssApi( originalNode.getProfile()).rename(oldNamePath, newNamePath); await originalNode.refreshAndReopen(hasClosedTab); if (oldFavorite) { this.removeFavorite(oldFavorite); oldFavorite.rename(newNamePath); this.addFavorite(oldFavorite); } } catch (err) { errorHandling(err, originalNode.mProfileName, localize("renameUSSNode.error", "Unable to rename node: ") + err.message); throw (err); <<<<<<< public checkDuplicateLabel(newLabel: string, nodesToCheck: IZoweUSSTreeNode[], newNodeType: string) { for (const node of nodesToCheck) { const nodeType = contextually.isFolder(node) ? "folder" : "file"; newLabel = newLabel.replace(/^\/+/, ""); if (newLabel === node.label.trim() && newNodeType === nodeType) { return localize("renameUSSNode.duplicateName", "A {0} already exists with this name. Please choose a different one.", newNodeType); } } return null; } ======= >>>>>>> public checkDuplicateLabel(newLabel: string, nodesToCheck: IZoweUSSTreeNode[], newNodeType: string) { for (const node of nodesToCheck) { const nodeType = contextually.isFolder(node) ? "folder" : "file"; newLabel = newLabel.replace(/^\/+/, ""); if (newLabel === node.label.trim() && newNodeType === nodeType) { return localize("renameUSSNode.duplicateName", "A {0} already exists with this name. Please choose a different one.", newNodeType); } } return null; }
<<<<<<< import getVortexPath from './getVortexPath'; import { log } from './log'; ======= import getVortexPath from './getVortexPath'; >>>>>>> import getVortexPath from './getVortexPath'; import { log } from './log'; <<<<<<< import I18next from 'i18next'; import * as FSBackend from 'i18next-node-fs-backend'; import { initReactI18next } from 'react-i18next'; ======= import I18next, { i18n, TOptions } from 'i18next'; import FSBackend from 'i18next-node-fs-backend'; >>>>>>> import I18next, { i18n, TOptions } from 'i18next'; import FSBackend from 'i18next-node-fs-backend'; <<<<<<< ======= import { initReactI18next } from 'react-i18next'; type TFunction = typeof I18next.t; >>>>>>> import { initReactI18next } from 'react-i18next'; type TFunction = typeof I18next.t; <<<<<<< const i18n = I18next .use(MultiBackend) .use(initReactI18next); ======= const i18nObj = I18next .use(MultiBackend as any) .use(initReactI18next); >>>>>>> const i18nObj = I18next .use(MultiBackend as any) .use(initReactI18next);
<<<<<<< public delete(){ return { name: "profile1", profile: {}, type: "zosmf" }; } ======= public get configurations() { return [{ type: "zosmf", schema: { type: "object", title: "test profile", description: "test profile", properties: { sum: { type: "number" } }, required: ["sum"] }, }, { type: "banana", schema: { type: "object", title: "test banana", description: "test banana", properties: { sum: { type: "number" } }, required: ["sum"] }, }]; } >>>>>>> public delete(){ return { name: "profile1", profile: {}, type: "zosmf" }; } public get configurations() { return [{ type: "zosmf", schema: { type: "object", title: "test profile", description: "test profile", properties: { sum: { type: "number" } }, required: ["sum"] }, }, { type: "banana", schema: { type: "object", title: "test banana", description: "test banana", properties: { sum: { type: "number" } }, required: ["sum"] }, }]; }
<<<<<<< export const setLoginId = safeCreateAction('SET_LOGIN_ID', id => id); export const setLoginError = safeCreateAction('SET_LOGIN_ERROR', error => error); ======= /* * associate with nxm urls */ export const setLoginId = safeCreateAction('SET_LOGIN_ID', id => id); /** * store last time we checked for updates */ export const setLastUpdateCheck = safeCreateAction('SET_LAST_UPDATE_CHECK', (gameId: string, time: number, range: number, updateList: IUpdateEntry[]) => ({ gameId, time, range, updateList })); >>>>>>> export const setLoginId = safeCreateAction('SET_LOGIN_ID', id => id); export const setLoginError = safeCreateAction('SET_LOGIN_ERROR', error => error); /** * store last time we checked for updates */ export const setLastUpdateCheck = safeCreateAction('SET_LAST_UPDATE_CHECK', (gameId: string, time: number, range: number, updateList: IUpdateEntry[]) => ({ gameId, time, range, updateList }));
<<<<<<< import { Logger, TextUtils, IProfileLoaded, ImperativeConfig, Session, CredentialManagerFactory, ImperativeError, DefaultCredentialManager } from "@zowe/imperative"; ======= import { Logger, TextUtils, IProfileLoaded, ImperativeConfig, Session, CredentialManagerFactory, ImperativeError, DefaultCredentialManager, CliProfileManager } from "@brightside/imperative"; >>>>>>> import { Logger, TextUtils, IProfileLoaded, ImperativeConfig, Session, CredentialManagerFactory, ImperativeError, DefaultCredentialManager, CliProfileManager } from "@zowe/imperative";
<<<<<<< function createGlobalMocks() { const globalMocks = { qpPlaceholder: "Choose \"Create new...\" to define a new profile or select an existing profile to Add to the Data Set Explorer" }; ======= async function createGlobalMocks() { >>>>>>> async function createGlobalMocks() { const globalMocks = { qpPlaceholder: "Choose \"Create new...\" to define a new profile or select an existing profile to Add to the Data Set Explorer" }; <<<<<<< describe("Shared Actions Unit Tests - Function addZoweSession", () => { function createBlockMocks() { const session = createISessionWithoutCredentials(); const treeView = createTreeView(); const imperativeProfile = createIProfile(); const profileInstance = createInstanceOfProfile(imperativeProfile); const datasetSessionNode = createDatasetSessionNode(session, imperativeProfile); const quickPickItem = createQuickPickItem(); return { session, imperativeProfile, profileInstance, datasetSessionNode, testDatasetTree: createDatasetTree(datasetSessionNode, treeView), quickPickItem }; } afterAll(() => jest.restoreAllMocks()); it("Checking that addSession will cancel if there is no profile name", async () => { const globalMocks = createGlobalMocks(); const blockMocks = createBlockMocks(); const entered = undefined; mocked(vscode.window.showInputBox).mockResolvedValueOnce(entered); mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); // Assert edge condition user cancels the input path box mocked(vscode.window.createQuickPick) .mockReturnValue(createQuickPickContent(entered, [blockMocks.quickPickItem], globalMocks.qpPlaceholder)); jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); await extension.addZoweSession(blockMocks.testDatasetTree); expect(mocked(vscode.window.showInformationMessage).mock.calls[0][0]).toEqual("Profile Name was not supplied. Operation Cancelled"); }); it("Checking that addSession works correctly with supplied profile name", async () => { const globalMocks = createGlobalMocks(); const blockMocks = createBlockMocks(); const entered = undefined; mocked(vscode.window.showInputBox).mockResolvedValueOnce("fake"); mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); // Assert edge condition user cancels the input path box mocked(vscode.window.createQuickPick).mockReturnValue(createQuickPickContent(entered, [blockMocks.quickPickItem], globalMocks.qpPlaceholder)); jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); await extension.addZoweSession(blockMocks.testDatasetTree); expect(blockMocks.testDatasetTree.addSession).toBeCalled(); expect(blockMocks.testDatasetTree.addSession.mock.calls[0][0]).toEqual({ newprofile: "fake" }); }); it("Checking that addSession works correctly with existing profile", async () => { const globalMocks = createGlobalMocks(); const blockMocks = createBlockMocks(); const entered = ""; mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); // Assert edge condition user cancels the input path box const quickPickContent = createQuickPickContent(entered, [blockMocks.quickPickItem], globalMocks.qpPlaceholder); quickPickContent.label = "firstName"; mocked(vscode.window.createQuickPick).mockReturnValue(quickPickContent); jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(quickPickContent); await extension.addZoweSession(blockMocks.testDatasetTree); expect(blockMocks.testDatasetTree.addSession).not.toBeCalled(); }); it("Checking that addSession works correctly with supplied resolveQuickPickHelper", async () => { const globalMocks = createGlobalMocks(); const blockMocks = createBlockMocks(); const entered = "fake"; mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); mocked(vscode.window.createQuickPick).mockReturnValue(createQuickPickContent(entered, [blockMocks.quickPickItem], globalMocks.qpPlaceholder)); jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); await extension.addZoweSession(blockMocks.testDatasetTree); expect(blockMocks.testDatasetTree.addSession).not.toBeCalled(); }); it("Checking that addSession works correctly with undefined profile", async () => { const globalMocks = createGlobalMocks(); const blockMocks = createBlockMocks(); const entered = ""; mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); // Assert edge condition user cancels the input path box const quickPickContent = createQuickPickContent(entered, [blockMocks.quickPickItem], globalMocks.qpPlaceholder); quickPickContent.label = undefined; mocked(vscode.window.createQuickPick).mockReturnValue(quickPickContent); jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(quickPickContent); await extension.addZoweSession(blockMocks.testDatasetTree); expect(blockMocks.testDatasetTree.addSession).not.toBeCalled(); }); it("Checking that addSession works correctly if createNewConnection is invalid", async () => { const globalMocks = createGlobalMocks(); const blockMocks = createBlockMocks(); const entered = "fake"; blockMocks.profileInstance.createNewConnection = jest.fn().mockRejectedValue(new Error("create connection error")); mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); mocked(vscode.window.showInputBox).mockResolvedValueOnce(entered); mocked(vscode.window.createQuickPick).mockReturnValue(createQuickPickContent(entered, [blockMocks.quickPickItem], globalMocks.qpPlaceholder)); jest.spyOn(utils, "resolveQuickPickHelper").mockResolvedValueOnce(blockMocks.quickPickItem); const errorHandlingSpy = jest.spyOn(utils, "errorHandling"); await extension.addZoweSession(blockMocks.testDatasetTree); expect(errorHandlingSpy).toBeCalled(); expect(errorHandlingSpy.mock.calls[0][0]).toEqual(new Error("create connection error")); }); }); ======= >>>>>>>
<<<<<<< ======= it("Testing that that openPS credentials prompt is executed successfully", async () => { showQuickPick.mockReset(); showInputBox.mockReset(); showTextDocument.mockReset(); openTextDocument.mockReset(); const sessionwocred = new brtimperative.Session({ user: "", password: "", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const dsNode = new ZoweNode("testSess", vscode.TreeItemCollapsibleState.Expanded, sessNode, sessionwocred); dsNode.contextValue = extension.DS_SESSION_CONTEXT; Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName", profile: {user:undefined, password: undefined}}, {name: "secondName"}], defaultProfile: {name: "firstName"}, promptCredentials: jest.fn(()=> { return [{values: "fake"}, {values: "fake"}, {values: "fake"}]; }), }; }) }); showInputBox.mockReturnValueOnce("fake"); showInputBox.mockReturnValueOnce("fake"); await extension.openPS(dsNode, true); expect(openTextDocument.mock.calls.length).toBe(1); expect(showTextDocument.mock.calls.length).toBe(1); }); it("Testing that that openPS credentials prompt works with favorites", async () => { showTextDocument.mockReset(); openTextDocument.mockReset(); showQuickPick.mockReset(); showInputBox.mockReset(); const sessionwocred = new brtimperative.Session({ user: "", password: "", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const dsNode = new ZoweNode("[test]: TEST.JCL", vscode.TreeItemCollapsibleState.Expanded, sessNode, sessionwocred); dsNode.contextValue = extension.DS_PDS_CONTEXT + extension.FAV_SUFFIX; Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName", profile: {user:undefined, password: undefined}}, {name: "secondName"}], defaultProfile: {name: "firstName"}, promptCredentials: jest.fn(()=> { return [{values: "fake"}, {values: "fake"}, {values: "fake"}]; }), }; }) }); showInputBox.mockReturnValueOnce("fake"); showInputBox.mockReturnValueOnce("fake"); await extension.openPS(dsNode, true); expect(openTextDocument.mock.calls.length).toBe(1); expect(showTextDocument.mock.calls.length).toBe(1); }); it("Testing that that openPS credentials prompt ends in error", async () => { showTextDocument.mockReset(); openTextDocument.mockReset(); showQuickPick.mockReset(); showInputBox.mockReset(); const sessionwocred = new brtimperative.Session({ user: "", password: "", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const dsNode = new ZoweNode("testSess", vscode.TreeItemCollapsibleState.Expanded, sessNode, sessionwocred); dsNode.contextValue = extension.DS_SESSION_CONTEXT; Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName", profile: {user:undefined, password: undefined}}, {name: "secondName"}], defaultProfile: {name: "firstName"} }; }) }); await extension.openPS(dsNode, true); expect(showErrorMessage.mock.calls.length).toBe(1); showQuickPick.mockReset(); showInputBox.mockReset(); showInformationMessage.mockReset(); showErrorMessage.mockReset(); }); it("Testing that safeSave is executed successfully", async () => { dataSet.mockReset(); openTextDocument.mockReset(); showTextDocument.mockReset(); showInformationMessage.mockReset(); const node = new ZoweNode("node", vscode.TreeItemCollapsibleState.None, sessNode, null); const parent = new ZoweNode("parent", vscode.TreeItemCollapsibleState.Collapsed, sessNode, null); const child = new ZoweNode("child", vscode.TreeItemCollapsibleState.None, parent, null); openTextDocument.mockResolvedValueOnce("test"); await extension.safeSave(node); expect(dataSet.mock.calls.length).toBe(1); expect(dataSet.mock.calls[0][0]).toBe(session); expect(dataSet.mock.calls[0][1]).toBe(node.label); expect(dataSet.mock.calls[0][2]).toEqual({file: extension.getDocumentFilePath(node.label, node)}); expect(openTextDocument.mock.calls.length).toBe(1); expect(openTextDocument.mock.calls[0][0]).toBe(path.join(extension.DS_DIR, node.getSessionNode().label.trim(), node.label )); expect(showTextDocument.mock.calls.length).toBe(1); expect(showTextDocument.mock.calls[0][0]).toBe("test"); expect(save.mock.calls.length).toBe(1); dataSet.mockReset(); dataSet.mockRejectedValueOnce(Error("not found")); await extension.safeSave(node); expect(showInformationMessage.mock.calls.length).toBe(1); expect(showInformationMessage.mock.calls[0][0]).toBe("Unable to find file: " + node.label + " was probably deleted."); dataSet.mockReset(); showErrorMessage.mockReset(); dataSet.mockRejectedValueOnce(Error("")); await extension.safeSave(child); expect(showErrorMessage.mock.calls.length).toBe(1); expect(showErrorMessage.mock.calls[0][0]).toEqual(""); openTextDocument.mockResolvedValueOnce("test"); openTextDocument.mockResolvedValueOnce("test"); dataSet.mockReset(); openTextDocument.mockReset(); node.contextValue = extension.DS_PDS_CONTEXT + extension.FAV_SUFFIX; await extension.safeSave(node); expect(openTextDocument.mock.calls.length).toBe(1); expect(dataSet.mock.calls.length).toBe(1); dataSet.mockReset(); openTextDocument.mockReset(); parent.contextValue = extension.DS_PDS_CONTEXT + extension.FAV_SUFFIX; await extension.safeSave(child); expect(openTextDocument.mock.calls.length).toBe(1); expect(dataSet.mock.calls.length).toBe(1); dataSet.mockReset(); openTextDocument.mockReset(); parent.contextValue = extension.FAVORITE_CONTEXT; await extension.safeSave(child); expect(openTextDocument.mock.calls.length).toBe(1); expect(dataSet.mock.calls.length).toBe(1); showErrorMessage.mockReset(); dataSet.mockReset(); openTextDocument.mockReset(); parent.contextValue = "turnip"; await extension.safeSave(child); expect(openTextDocument.mock.calls.length).toBe(0); expect(dataSet.mock.calls.length).toBe(0); expect(showErrorMessage.mock.calls.length).toBe(1); expect(showErrorMessage.mock.calls[0][0]).toEqual("safeSave() called from invalid node."); }); it("Testing that safeSaveUSS is executed successfully", async () => { ussFile.mockReset(); openTextDocument.mockReset(); showTextDocument.mockReset(); showInformationMessage.mockReset(); save.mockReset(); const node = new ZoweUSSNode("node", vscode.TreeItemCollapsibleState.None, ussNode, null, null); const parent = new ZoweUSSNode("parent", vscode.TreeItemCollapsibleState.Collapsed, ussNode, null, null); const child = new ZoweUSSNode("child", vscode.TreeItemCollapsibleState.None, parent, null, null); openTextDocument.mockResolvedValueOnce("test"); await extension.safeSaveUSS(node); expect(ussFile.mock.calls.length).toBe(1); expect(ussFile.mock.calls[0][0]).toBe(node.getSession()); expect(ussFile.mock.calls[0][1]).toBe(node.fullPath); expect(ussFile.mock.calls[0][2]).toEqual({file: extension.getUSSDocumentFilePath(node)}); expect(openTextDocument.mock.calls.length).toBe(1); expect(openTextDocument.mock.calls[0][0]).toBe(path.join(extension.getUSSDocumentFilePath(node))); expect(showTextDocument.mock.calls.length).toBe(1); expect(showTextDocument.mock.calls[0][0]).toBe("test"); expect(save.mock.calls.length).toBe(1); ussFile.mockReset(); ussFile.mockRejectedValueOnce(Error("not found")); await extension.safeSaveUSS(node); expect(showInformationMessage.mock.calls.length).toBe(1); expect(showInformationMessage.mock.calls[0][0]).toBe("Unable to find file: " + node.fullPath + " was probably deleted."); ussFile.mockReset(); showErrorMessage.mockReset(); ussFile.mockRejectedValueOnce(Error("")); await extension.safeSaveUSS(child); expect(showErrorMessage.mock.calls.length).toBe(1); expect(showErrorMessage.mock.calls[0][0]).toEqual(""); }); >>>>>>> it("Testing that that openPS credentials prompt is executed successfully", async () => { showQuickPick.mockReset(); showInputBox.mockReset(); showTextDocument.mockReset(); openTextDocument.mockReset(); const sessionwocred = new brtimperative.Session({ user: "", password: "", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const dsNode = new ZoweNode("testSess", vscode.TreeItemCollapsibleState.Expanded, sessNode, sessionwocred); dsNode.contextValue = extension.DS_SESSION_CONTEXT; Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName", profile: {user:undefined, password: undefined}}, {name: "secondName"}], defaultProfile: {name: "firstName"}, promptCredentials: jest.fn(()=> { return [{values: "fake"}, {values: "fake"}, {values: "fake"}]; }), }; }) }); showInputBox.mockReturnValueOnce("fake"); showInputBox.mockReturnValueOnce("fake"); await extension.openPS(dsNode, true); expect(openTextDocument.mock.calls.length).toBe(1); expect(showTextDocument.mock.calls.length).toBe(1); }); it("Testing that that openPS credentials prompt works with favorites", async () => { showTextDocument.mockReset(); openTextDocument.mockReset(); showQuickPick.mockReset(); showInputBox.mockReset(); const sessionwocred = new brtimperative.Session({ user: "", password: "", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const dsNode = new ZoweNode("[test]: TEST.JCL", vscode.TreeItemCollapsibleState.Expanded, sessNode, sessionwocred); dsNode.contextValue = extension.DS_PDS_CONTEXT + extension.FAV_SUFFIX; Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName", profile: {user:undefined, password: undefined}}, {name: "secondName"}], defaultProfile: {name: "firstName"}, promptCredentials: jest.fn(()=> { return [{values: "fake"}, {values: "fake"}, {values: "fake"}]; }), }; }) }); showInputBox.mockReturnValueOnce("fake"); showInputBox.mockReturnValueOnce("fake"); await extension.openPS(dsNode, true); expect(openTextDocument.mock.calls.length).toBe(1); expect(showTextDocument.mock.calls.length).toBe(1); }); it("Testing that that openPS credentials prompt ends in error", async () => { showTextDocument.mockReset(); openTextDocument.mockReset(); showQuickPick.mockReset(); showInputBox.mockReset(); const sessionwocred = new brtimperative.Session({ user: "", password: "", hostname: "fake", port: 443, protocol: "https", type: "basic", }); const dsNode = new ZoweNode("testSess", vscode.TreeItemCollapsibleState.Expanded, sessNode, sessionwocred); dsNode.contextValue = extension.DS_SESSION_CONTEXT; Object.defineProperty(profileLoader.Profiles, "getInstance", { value: jest.fn(() => { return { allProfiles: [{name: "firstName", profile: {user:undefined, password: undefined}}, {name: "secondName"}], defaultProfile: {name: "firstName"} }; }) }); await extension.openPS(dsNode, true); expect(showErrorMessage.mock.calls.length).toBe(1); showQuickPick.mockReset(); showInputBox.mockReset(); showInformationMessage.mockReset(); showErrorMessage.mockReset(); });
<<<<<<< ======= describe("deleteUSSNode", () => { it("should delete node if user verified", async () => { showQuickPick.mockResolvedValueOnce("Yes"); await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); expect(testUSSTree.refresh).toHaveBeenCalled(); }); it("should not delete node if user did not verify", async () => { showQuickPick.mockResolvedValueOnce("No"); await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); expect(testUSSTree.refresh).not.toHaveBeenCalled(); }); it("should not delete node if user cancelled", async () => { showQuickPick.mockResolvedValueOnce(undefined); await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); expect(testUSSTree.refresh).not.toHaveBeenCalled(); }); it("should not delete node if an error thrown", async () => { showErrorMessage.mockReset(); showQuickPick.mockResolvedValueOnce("Yes"); ussFile.mockImplementationOnce(() => { throw (Error("testError")); }); try { await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); // tslint:disable-next-line:no-empty } catch (err) { } expect(showErrorMessage.mock.calls.length).toBe(1); expect(testUSSTree.refresh).not.toHaveBeenCalled(); }); }); >>>>>>> describe("deleteUSSNode", () => { it("should delete node if user verified", async () => { showQuickPick.mockResolvedValueOnce("Yes"); await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); expect(testUSSTree.refresh).toHaveBeenCalled(); }); it("should not delete node if user did not verify", async () => { showQuickPick.mockResolvedValueOnce("No"); await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); expect(testUSSTree.refresh).not.toHaveBeenCalled(); }); it("should not delete node if user cancelled", async () => { showQuickPick.mockResolvedValueOnce(undefined); await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); expect(testUSSTree.refresh).not.toHaveBeenCalled(); }); it("should not delete node if an error thrown", async () => { showErrorMessage.mockReset(); showQuickPick.mockResolvedValueOnce("Yes"); ussFile.mockImplementationOnce(() => { throw (Error("testError")); }); try { await ussNodeActions.deleteUSSNode(ussNode, testUSSTree, ""); // tslint:disable-next-line:no-empty } catch (err) { } expect(showErrorMessage.mock.calls.length).toBe(1); expect(testUSSTree.refresh).not.toHaveBeenCalled(); }); });
<<<<<<< constructor(events: NodeJS.EventEmitter, store: Redux.Store<any>, manager: DownloadManager) { this.mStore = store; ======= constructor(api: IExtensionApi, manager: DownloadManager, protocolHandlers: IProtocolHandlers) { this.mApi = api; const events = api.events; >>>>>>> constructor(api: IExtensionApi, manager: DownloadManager) { this.mApi = api; const events = api.events; <<<<<<< private translateError(err: any): { message: string, url?: string } { const details: any = { message: err.message, }; if (err.http_headers !== undefined) { if (err.http_headers.nexuserror !== undefined) { details.message = err.http_headers.nexuserrorinfo; } else if (err.http_headers.status !== undefined) { details.message = err.http_headers.status; } } else if (err.code !== undefined) { if (err.code === 'ENOSPC') { details.message = 'The disk is full'; } else if (err.code === 'ECONNRESET') { details.message = 'Server refused the connection'; } } ======= private transformURLS(urls: string[] | URLFunc): Promise<string[] | URLFunc> { const transform = (input: string[]) => Promise.all(input.map((inputUrl: string) => { const protocol = nodeURL.parse(inputUrl).protocol; const handler = this.mProtocolHandlers[protocol]; return (handler !== undefined) ? handler(inputUrl) : Promise.resolve([inputUrl]); })) .reduce((prev: string[], current: string[]) => prev.concat(current), []); if (typeof(urls) === 'function') { return Promise.resolve(() => { return urls() .then(resolved => transform(resolved)); }); } else { return transform(urls); } } private translateError(err: any): string { const t = this.mApi.translate; >>>>>>> private translateError(err: any): string { const t = this.mApi.translate; <<<<<<< .then(() => { ======= .catch(err => callback(err, id)) .finally(() => { this.mApi.store.dispatch(finishDownload(id, 'finished', undefined)); >>>>>>> .catch(err => callback(err, id)) .finally(() => { this.mApi.store.dispatch(finishDownload(id, 'finished', undefined)); <<<<<<< function observe(events: NodeJS.EventEmitter, store: Redux.Store<any>, manager: DownloadManager) { return new DownloadObserver(events, store, manager); ======= function observe(api: IExtensionApi, manager: DownloadManager, protocolHandlers: IProtocolHandlers) { return new DownloadObserver(api, manager, protocolHandlers); >>>>>>> function observe(api: IExtensionApi, manager: DownloadManager) { return new DownloadObserver(api, manager);
<<<<<<< PendingRequestsComponent, ======= AddressBookComponent, >>>>>>> PendingRequestsComponent, AddressBookComponent,
<<<<<<< [limit]="state.options.limit" ======= [scrollHeight]="state.scrollHeight" >>>>>>> [scrollHeight]="state.scrollHeight" [limit]="state.options.limit"
<<<<<<< import { ElementRef, EventEmitter, Renderer2, OnInit, OnDestroy } from '@angular/core'; ======= import { ElementRef, EventEmitter, NgZone, OnInit, OnDestroy } from '@angular/core'; >>>>>>> import { ElementRef, EventEmitter, Renderer2, NgZone, OnInit, OnDestroy } from '@angular/core'; <<<<<<< constructor(element: ElementRef, renderer: Renderer2); ======= constructor(ngZone: NgZone, element: ElementRef); >>>>>>> constructor(ngZone: NgZone, element: ElementRef, renderer: Renderer2);
<<<<<<< // Enums import { ColumnMode } from 'enums/ColumnMode'; import { SortType } from 'enums/SortType'; import { SortDirection } from 'enums/SortDirection'; import { SelectionType } from 'enums/SelectionType'; // Models ======= // Model/Enums import { ColumnMode } from './enums/ColumnMode'; import { SortType } from './enums/SortType'; import { SortDirection } from './enums/SortDirection'; import { SelectionType } from './enums/SelectionType'; >>>>>>> // Enums import { ColumnMode } from './enums/ColumnMode'; import { SortType } from './enums/SortType'; import { SortDirection } from './enums/SortDirection'; import { SelectionType } from './enums/SelectionType'; // Models
<<<<<<< Component, Input, ElementRef, Output, EventEmitter, Renderer2, ======= Component, Input, ElementRef, Output, EventEmitter, NgZone, >>>>>>> Component, Input, ElementRef, Output, EventEmitter, Renderer2, NgZone, <<<<<<< constructor(element: ElementRef, private renderer: Renderer2) { ======= constructor(private ngZone: NgZone, element: ElementRef) { >>>>>>> constructor(private ngZone: NgZone, element: ElementRef, private renderer: Renderer2) { <<<<<<< const renderer = this.renderer; this.parentElement = renderer.parentNode(renderer.parentNode(this.element)); this.onScrollListener = renderer.listen( this.parentElement, 'scroll', this.onScrolled.bind(this)); ======= this.parentElement = this.element.parentElement.parentElement; this.ngZone.runOutsideAngular(() => { this.parentElement.addEventListener('scroll', this.onScrolled.bind(this)); }); >>>>>>> const renderer = this.renderer; this.parentElement = renderer.parentNode(renderer.parentNode(this.element)); this.ngZone.runOutsideAngular(() => { renderer.listen( this.parentElement, 'scroll', this.onScrolled.bind(this)); });
<<<<<<< import { RetriableReadableStreamOptions } from "../../src/utils/RetriableReadableStream"; import { createRandomLocalFile, getBSU, getUniqueName } from "../utils"; import { readStreamToLocalFile } from "../../src/utils/utils.common"; ======= import { downloadBlobToBuffer, uploadFileToBlockBlob, uploadStreamToBlockBlob } from "../../src/highlevel.node"; import { IRetriableReadableStreamOptions } from "../../src/utils/RetriableReadableStream"; import { createRandomLocalFile, getBSU, readStreamToLocalFile } from "../utils"; import { record } from "../utils/recorder"; >>>>>>> import { createRandomLocalFile, getBSU } from "../utils"; import { RetriableReadableStreamOptions } from "../../src/utils/RetriableReadableStream"; import { record } from "../utils/recorder"; import { ContainerClient, BlobClient, BlockBlobClient } from "../../src"; import { readStreamToLocalFile } from "../../src/utils/utils.common"; <<<<<<< describe("Highlevel Node.js only", () => { const blobServiceClient = getBSU(); let containerName = getUniqueName("container"); let containerClient = blobServiceClient.createContainerClient(containerName); let blobName = getUniqueName("blob"); let blobClient = containerClient.createBlobClient(blobName); let blockBlobClient = blobClient.createBlockBlobClient(); ======= describe("Highlevel", () => { const serviceURL = getBSU(); let containerName: string; let containerURL: ContainerURL; let blobName: string; let blobURL: BlobURL; let blockBlobURL: BlockBlobURL; >>>>>>> describe("Highlevel", () => { const blobServiceClient = getBSU(); let containerName: string; let containerClient: ContainerClient; let blobName: string; let blobClient: BlobClient; let blockBlobClient: BlockBlobClient; <<<<<<< beforeEach(async () => { containerName = getUniqueName("container"); containerClient = blobServiceClient.createContainerClient(containerName); await containerClient.create(); blobName = getUniqueName("blob"); blobClient = containerClient.createBlobClient(blobName); blockBlobClient = blobClient.createBlockBlobClient(); ======= let recorder: any; beforeEach(async function() { recorder = record(this); containerName = recorder.getUniqueName("container"); containerURL = ContainerURL.fromServiceURL(serviceURL, containerName); await containerURL.create(Aborter.none); blobName = recorder.getUniqueName("blob"); blobURL = BlobURL.fromContainerURL(containerURL, blobName); blockBlobURL = BlockBlobURL.fromBlobURL(blobURL); >>>>>>> let recorder: any; beforeEach(async function() { recorder = record(this); containerName = recorder.getUniqueName("container"); containerClient = blobServiceClient.createContainerClient(containerName); await containerClient.create(); blobName = recorder.getUniqueName("blob"); blobClient = containerClient.createBlobClient(blobName); blockBlobClient = blobClient.createBlockBlobClient(); <<<<<<< await containerClient.delete(); ======= await containerURL.delete(Aborter.none); recorder.stop(); >>>>>>> await containerClient.delete(); recorder.stop(); <<<<<<< const downloadResponse = await blockBlobClient.download(0); const downloadedFile = path.join(tempFolderPath, getUniqueName("downloadfile.")); ======= const downloadResponse = await blockBlobURL.download(Aborter.none, 0); const downloadedFile = path.join(tempFolderPath, recorder.getUniqueName("downloadfile.")); >>>>>>> const downloadResponse = await blockBlobClient.download(0); const downloadedFile = path.join(tempFolderPath, recorder.getUniqueName("downloadfile.")); <<<<<<< const downloadResponse = await blockBlobClient.download(0); const downloadedFile = path.join(tempFolderPath, getUniqueName("downloadfile.")); ======= const downloadResponse = await blockBlobURL.download(Aborter.none, 0); const downloadedFile = path.join(tempFolderPath, recorder.getUniqueName("downloadfile.")); >>>>>>> const downloadResponse = await blockBlobClient.download(0); const downloadedFile = path.join(tempFolderPath, recorder.getUniqueName("downloadfile.")); <<<<<<< const downloadResponse = await blockBlobClient.download(0); const downloadedFile = path.join(tempFolderPath, getUniqueName("downloadfile.")); ======= const downloadResponse = await blockBlobURL.download(Aborter.none, 0); const downloadedFile = path.join(tempFolderPath, recorder.getUniqueName("downloadfile.")); >>>>>>> const downloadResponse = await blockBlobClient.download(0); const downloadedFile = path.join(tempFolderPath, recorder.getUniqueName("downloadfile."));
<<<<<<< ======= import runElevated from './elevated'; import { globalT } from './i18n'; >>>>>>> import { globalT } from './i18n';
<<<<<<< import { BlockBlobClient } from "../src/BlockBlobClient"; import { getBSU, getUniqueName } from "./utils/index"; ======= import { Aborter } from "../src/Aborter"; import { BlockBlobURL } from "../src/BlockBlobURL"; import { ContainerURL } from "../src/ContainerURL"; import { getBSU } from "./utils/index"; >>>>>>> import { BlockBlobClient } from "../src/BlockBlobClient"; import { getBSU } from "./utils/index"; <<<<<<< const blobName: string = getUniqueName("blob empty"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("blob empty"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("blob empty"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("blob empty"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("blob empty"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("blob empty"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline <<<<<<< const blobName: string = getUniqueName("////blob/empty /another"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("////blob/empty /another"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("////blob/empty /another"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("////blob/empty /another"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("////blob/empty /another"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("////blob/empty /another"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline <<<<<<< const blobName: string = getUniqueName("////Upper/blob/empty /another"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("////Upper/blob/empty /another"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline <<<<<<< const blobName: string = getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("////Upper/blob/empty /another 汉字"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline <<<<<<< const blobName: string = getUniqueName("ру́сский язы́к"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("ру́сский язы́к"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("ру́сский язы́к"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("ру́сский язы́к"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("ру́сский язы́к"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("ру́сский язы́к"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline <<<<<<< const blobName: string = getUniqueName("عربي/عربى"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("عربي/عربى"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("عربي/عربى"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("عربي/عربى"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("عربي/عربى"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("عربي/عربى"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline <<<<<<< const blobName: string = getUniqueName("にっぽんご/にほんご"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); ======= const blobName: string = recorder.getUniqueName("にっぽんご/にほんご"); const blockBlobURL = BlockBlobURL.fromContainerURL(containerURL, blobName); >>>>>>> const blobName: string = recorder.getUniqueName("にっぽんご/にほんご"); const blockBlobClient = containerClient.createBlockBlobClient(blobName); <<<<<<< const blobName: string = getUniqueName("にっぽんご/にほんご"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline ======= const blobName: string = recorder.getUniqueName("にっぽんご/にほんご"); const blockBlobURL = new BlockBlobURL( appendToURLPath(containerURL.url, blobName), containerURL.pipeline >>>>>>> const blobName: string = recorder.getUniqueName("にっぽんご/にほんご"); const blockBlobClient = new BlockBlobClient( appendToURLPath(containerClient.url, blobName), containerClient.pipeline
<<<<<<< import Promise from 'bluebird'; import NexusT from 'nexus-api'; ======= import * as Promise from 'bluebird'; import NexusT from '@nexusmods/nexus-api'; >>>>>>> import NexusT from '@nexusmods/nexus-api'; import Promise from 'bluebird';
<<<<<<< import { RestError, ShareClient } from "../src"; import { newPipeline, Pipeline } from "../src/Pipeline"; import { getBSU, getUniqueName } from "./utils"; ======= import { RestError, StorageURL } from "../src"; import { Aborter } from "../src/Aborter"; import { ShareURL } from "../src/ShareURL"; import { Pipeline } from "../src/Pipeline"; import { getBSU } from "./utils"; >>>>>>> import { RestError, ShareClient } from "../src"; import { newPipeline, Pipeline } from "../src/Pipeline"; import { getBSU } from "./utils"; <<<<<<< await shareClient.delete(); ======= await shareURL.delete(Aborter.none); recorder.stop(); >>>>>>> await shareClient.delete(); recorder.stop();
<<<<<<< generateUuid, isValidUuid, encodeUri, RestError, RequestOptionsBase, RequestPolicy, ServiceCallback, promiseToCallback, promiseToServiceCallback, isStream, dispatchRequest, RedirectFilter, applyMixins, isNode, stringifyXML, prepareXMLRootList ======= generateUuid, isValidUuid, encodeUri, RestError, RequestOptionsBase, RequestFunction, ServiceCallback, promiseToCallback, promiseToServiceCallback, isStream, dispatchRequest, RedirectFilter, applyMixins, isNode, stringifyXML, prepareXMLRootList, isDuration >>>>>>> generateUuid, isValidUuid, encodeUri, RestError, RequestOptionsBase, RequestPolicy, ServiceCallback, promiseToCallback, promiseToServiceCallback, isStream, dispatchRequest, RedirectFilter, applyMixins, isNode, stringifyXML, prepareXMLRootList, isDuration
<<<<<<< import { FileClient } from "../src/FileClient"; import { getBSU, getUniqueName } from "./utils/index"; ======= import { Aborter } from "../src/Aborter"; import { FileURL } from "../src/FileURL"; import { ShareURL } from "../src/ShareURL"; import { getBSU } from "./utils/index"; >>>>>>> import { FileClient } from "../src/FileClient"; import { getBSU } from "./utils/index"; <<<<<<< import { DirectoryClient } from "../src/DirectoryClient"; ======= import { DirectoryURL } from "../src/DirectoryURL"; import { record } from "./utils/recorder"; >>>>>>> import { DirectoryClient } from "../src/DirectoryClient"; import { record } from "./utils/recorder"; <<<<<<< const fileName: string = getUniqueName("file empty"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("file empty"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("file empty"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("file empty"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); ======= const fileName: string = recorder.getUniqueName("file empty"); const fileURL = new FileURL(appendToURLPath(directoryURL.url, fileName), directoryURL.pipeline); >>>>>>> const fileName: string = recorder.getUniqueName("file empty"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); <<<<<<< const fileName: string = getUniqueName("Upper file empty another"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("Upper file empty another"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("Upper file empty another"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("Upper file empty another"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); ======= const fileName: string = recorder.getUniqueName("Upper file empty another"); const fileURL = new FileURL(appendToURLPath(directoryURL.url, fileName), directoryURL.pipeline); >>>>>>> const fileName: string = recorder.getUniqueName("Upper file empty another"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); <<<<<<< const fileName: string = getUniqueName("Upper file empty another 汉字"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("Upper file empty another 汉字"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("Upper file empty another 汉字"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("Upper file empty another 汉字"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); ======= const fileName: string = recorder.getUniqueName("Upper file empty another 汉字"); const fileURL = new FileURL(appendToURLPath(directoryURL.url, fileName), directoryURL.pipeline); >>>>>>> const fileName: string = recorder.getUniqueName("Upper file empty another 汉字"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); <<<<<<< const fileName: string = getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const fileClient = new FileClient( ======= const fileName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const fileURL = new FileURL( >>>>>>> const fileName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const fileClient = new FileClient( <<<<<<< const directoryName: string = getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const specialDirectoryClient = shareClient.createDirectoryClient(directoryName); const rootDirectoryClient = shareClient.createDirectoryClient(""); await specialDirectoryClient.create(); await specialDirectoryClient.getProperties(); const response = await rootDirectoryClient.listFilesAndDirectoriesSegment(undefined, { // NOTICE: Azure Storage Server will replace "\" with "/" in the file names prefix: directoryName.replace(/\\/g, "/") }); ======= const directoryName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const specialDirectoryURL = DirectoryURL.fromShareURL(shareURL, directoryName); const rootDirectoryURL = DirectoryURL.fromShareURL(shareURL, ""); await specialDirectoryURL.create(Aborter.none); await specialDirectoryURL.getProperties(Aborter.none); const response = await rootDirectoryURL.listFilesAndDirectoriesSegment( Aborter.none, undefined, { // NOTICE: Azure Storage Server will replace "\" with "/" in the file names prefix: directoryName.replace(/\\/g, "/") } ); >>>>>>> const directoryName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const specialDirectoryClient = shareClient.createDirectoryClient(directoryName); const rootDirectoryClient = shareClient.createDirectoryClient(""); await specialDirectoryClient.create(); await specialDirectoryClient.getProperties(); const response = await rootDirectoryClient.listFilesAndDirectoriesSegment(undefined, { // NOTICE: Azure Storage Server will replace "\" with "/" in the file names prefix: directoryName.replace(/\\/g, "/") }); <<<<<<< const directoryName: string = getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const specialDirectoryClient = new DirectoryClient( ======= const directoryName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const specialDirectoryURL = new DirectoryURL( >>>>>>> const directoryName: string = recorder.getUniqueName("汉字. special ~!@#$%^&()_+`1234567890-={}[];','"); const specialDirectoryClient = new DirectoryClient( <<<<<<< const fileName: string = getUniqueName("ру́сский язы́к"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("ру́сский язы́к"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("ру́сский язы́к"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("ру́сский язы́к"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); ======= const fileName: string = recorder.getUniqueName("ру́сский язы́к"); const fileURL = new FileURL(appendToURLPath(directoryURL.url, fileName), directoryURL.pipeline); >>>>>>> const fileName: string = recorder.getUniqueName("ру́сский язы́к"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); <<<<<<< const fileName: string = getUniqueName("عربيعربى"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("عربيعربى"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("عربيعربى"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("عربيعربى"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); ======= const fileName: string = recorder.getUniqueName("عربيعربى"); const fileURL = new FileURL(appendToURLPath(directoryURL.url, fileName), directoryURL.pipeline); >>>>>>> const fileName: string = recorder.getUniqueName("عربيعربى"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); <<<<<<< const fileName: string = getUniqueName("にっぽんごにほんご"); const fileClient = directoryClient.createFileClient(fileName); ======= const fileName: string = recorder.getUniqueName("にっぽんごにほんご"); const fileURL = FileURL.fromDirectoryURL(directoryURL, fileName); >>>>>>> const fileName: string = recorder.getUniqueName("にっぽんごにほんご"); const fileClient = directoryClient.createFileClient(fileName); <<<<<<< const fileName: string = getUniqueName("にっぽんごにほんご"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline ); ======= const fileName: string = recorder.getUniqueName("にっぽんごにほんご"); const fileURL = new FileURL(appendToURLPath(directoryURL.url, fileName), directoryURL.pipeline); >>>>>>> const fileName: string = recorder.getUniqueName("にっぽんごにほんご"); const fileClient = new FileClient( appendToURLPath(directoryClient.url, fileName), directoryClient.pipeline );
<<<<<<< findOne(conditions:{}, fields?: {}, options?: {}, cb?: (err: Error, docs?: any)=>void): any; find(conditions:{}, fields?: {}, options?: {}, cb?: (err: Error, docs?: any[])=>void): any; ======= findById(id:string, fields?:string):any; find(conditions:{}, fields?: {}, options?: {}, cb?: (err: Error, docs?: any)=>void): any; >>>>>>> findOne(conditions:{}, fields?: {}, options?: {}, cb?: (err: Error, docs?: any)=>void): any; find(conditions:{}, fields?: {}, options?: {}, cb?: (err: Error, docs?: any[])=>void): any; findById(id:string, fields?:string):any; <<<<<<< res = [{ type: String, ref: mapping[res.ref.bucket] }]; ======= res = {type: [{type: mongoose.Schema.ObjectId, ref: mapping[res.ref.bucket]}], select: false}; >>>>>>> res = {type: [{type: String, ref: mapping[res.ref.bucket]}], select: false}; <<<<<<< var instance = new found.Model(doc); instance.save(function(err, doc){ if(!err){ doc.__rev = 0; promise.resolve(doc._cid); }else{ promise.reject(err); } }); ======= if(found.Model['filter']){ found.Model['filter'](doc, (err, doc) =>{ if(!err){ create(doc); } }); }else{ create(doc); } function create(doc){ var instance = new found.Model(doc); instance.save(function(err, doc){ if(!err){ doc.__rev = 0; promise.resolve(doc._id); }else{ promise.reject(err); } }); } >>>>>>> if(found.Model['filter']){ found.Model['filter'](doc, (err, doc) =>{ if(!err){ create(doc); } }); }else{ create(doc); } function create(doc){ var instance = new found.Model(doc); instance.save(function(err, doc){ if(!err){ doc.__rev = 0; promise.resolve(doc._cid); }else{ promise.reject(err); } }); } <<<<<<< found.Model.findOneAndUpdate({_cid:_.last(keyPath)}, doc, (err, oldDoc) => { if(!err){ // Note: isEqual should only check the properties present in doc! if(!_.isEqual(doc, oldDoc)){ // only if doc modified synchronize // Why is this out commented? //this.sync && this.sync.update(keyPath, doc); promise.resolve(); } }else{ promise.reject(err); } }); ======= if(found.Model['filter']){ found.Model['filter'](doc, (err, doc) =>{ if(!err){ update(doc); } }); }else{ update(doc); } function update(doc){ found.Model.findByIdAndUpdate(_.last(keyPath), doc, (err, oldDoc) => { if(!err){ // Note: isEqual should only check the properties present in doc! if(!_.isEqual(doc, oldDoc)){ // only if doc modified synchronize // Why is this out commented? //this.sync && this.sync.update(keyPath, doc); promise.resolve(); } }else{ promise.reject(err); } }); } >>>>>>> if(found.Model['filter']){ found.Model['filter'](doc, (err, doc) =>{ if(!err){ update(doc); } }); }else{ update(doc); } function update(doc){ found.Model.findOneAndUpdate({_cid:_.last(keyPath)}, doc, (err, oldDoc) => { if(!err){ // Note: isEqual should only check the properties present in doc! if(!_.isEqual(doc, oldDoc)){ // only if doc modified synchronize // Why is this out commented? //this.sync && this.sync.update(keyPath, doc); promise.resolve(); } }else{ promise.reject(err); } }); } <<<<<<< console.log(id, setName, query, opts); ======= >>>>>>> <<<<<<< private populate(Model: IMongooseModel, query: Storage.IStorageQuery, arr): Promise { var promise = new Promise(); Model .find(query.cond, query.fields, query.opts) .where('_cid').in(arr) .exec((err, doc) => { if(err) { promise.reject(err); }else{ promise.resolve(doc); } }); return promise; } ======= >>>>>>> private populate(Model: IMongooseModel, query: Storage.IStorageQuery, arr): Promise<any> { var promise = new Promise(); Model .find(query.cond, query.fields, query.opts) .where('_cid').in(arr) .exec((err, doc) => { if(err) { promise.reject(err); }else{ promise.resolve(doc); } }); return promise; } <<<<<<< private findEndPoints(ParentModel: IMongooseModel, parentId, name): Promise { var promise = new Promise(); ParentModel.findOne({_cid: parentId}).exec((err, doc) => { if(err) return promise.reject(err); else if(!doc) return promise.reject(Error('could not find end points')); else if(!doc[name] || doc[name].length === 0) promise.resolve(); else{ this.ListContainer.find() .where('gid').in(doc[name]) .or([{type:'_begin'}, {type:'_end'}]) .exec((err, docs)=>{ if(err) return promise.reject(err); if(docs.length < 2) return promise.reject(Error('could not find end points')); promise.resolve({ begin: _.find(docs, (doc) => { return doc.type === '_begin'; }), end: _.find(docs, (doc) => { return doc.type === '_end'; }) }); }); } ======= private findEndPoints(ParentModel: IMongooseModel, parentId, name, cb:(err: Error, begin?, end?)=>void){ ParentModel.findById(parentId).select(name).exec((err, doc) => { if(!doc) return cb(err); this.listContainer.find() .where('_id').in(doc[name]) .or([{type:'_begin'}, {type:'_end'}]) .exec((err, docs)=>{ if(docs.length < 2) return cb(Error('could not find end points')); cb(err, _.find(docs, (doc) => { return doc.type === '_begin'; }), _.find(docs, (doc) => { return doc.type === '_end'; }) ); }); >>>>>>> private findEndPoints(ParentModel: IMongooseModel, parentId, name): Promise<any> { var promise = new Promise(); ParentModel.findOne({_cid: parentId}).exec((err, doc) => { if(err) return promise.reject(err); else if(!doc) return promise.reject(Error('could not find end points')); else if(!doc[name] || doc[name].length === 0) promise.resolve(); else{ this.ListContainer.find() .where('gid').in(doc[name]) .or([{type:'_begin'}, {type:'_end'}]) .exec((err, docs)=>{ if(err) return promise.reject(err); if(docs.length < 2) return promise.reject(Error('could not find end points')); promise.resolve({ begin: _.find(docs, (doc) => { return doc.type === '_begin'; }), end: _.find(docs, (doc) => { return doc.type === '_end'; }) }); }); } /* private findEndPoints(ParentModel: IMongooseModel, parentId, name, cb:(err: Error, begin?, end?)=>void){ ParentModel.findById(parentId).select(name).exec((err, doc) => { if(!doc) return cb(err); this.listContainer.find() .where('_id').in(doc[name]) .or([{type:'_begin'}, {type:'_end'}]) .exec((err, docs)=>{ if(docs.length < 2) return cb(Error('could not find end points')); cb(err, _.find(docs, (doc) => { return doc.type === '_begin'; }), _.find(docs, (doc) => { return doc.type === '_end'; }) ); }); */ <<<<<<< private removeFromSeq(containerId: string): Promise ======= private removeFromSeq(containerId): Promise<void> >>>>>>> private removeFromSeq(containerId: string): Promise<void> <<<<<<< private initSequence(ParentModel: IMongooseModel, parentId, name): Promise { var promise = new Promise(); ParentModel.findOne({_cid: parentId}, (err, doc) => { if(err){ promise.reject(err); }else if(doc && doc[name].length < 2){ var first = new this.ListContainer({ gid: Util.uuid(), ======= private initSequence(ParentModel: IMongooseModel, parentId, name, cb:(err: Error, begin?, end?)=>void){ ParentModel.findById(parentId).select(name).exec((err, doc) => { if(err) return cb(err); if(doc[name].length < 2){ var first = new this.listContainer({ >>>>>>> private initSequence(ParentModel: IMongooseModel, parentId, name): Promise<any> { var promise = new Promise(); ParentModel.findOne({_cid: parentId}).select(name).exec((err, doc) => { if(err){ promise.reject(err); }else if(doc && doc[name].length < 2){ var first = new this.ListContainer({ gid: Util.uuid(), <<<<<<< // Returns the id of the new container private insertContainerBefore(ParentModel:IMongooseModel, parentId, name, nextId, itemKey, opts): Promise<string> ======= // cb: (err:Error, id?: string)=>void) private insertContainerBefore(ParentModel:IMongooseModel, parentId, name, nextId, itemKey, opts): Promise<void> >>>>>>> // Returns the id of the new container private insertContainerBefore(ParentModel:IMongooseModel, parentId, name, nextId, itemKey, opts): Promise<void> <<<<<<< insertBefore(keyPath: string[], refId: string, itemKeyPath: string[], opts): Promise<{id: string; refId: string;}> ======= // id?: string, refId?: string insertBefore(keyPath: string[], id: string, itemKeyPath: string[], opts): Promise<any> >>>>>>> insertBefore(keyPath: string[], refId: string, itemKeyPath: string[], opts): Promise<{id: string; refId: string;}>
<<<<<<< //styleUrls: ['./switch.scss'] ======= styleUrls: ['./switch.scss'], providers: [ {provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => JigsawSwitch), multi: true}, ] >>>>>>> //styleUrls: ['./switch.scss'], providers: [ {provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => JigsawSwitch), multi: true}, ]
<<<<<<< this._fromArray(this._bakData.filter(item => (<any[]>filter.field).find(field => { const value:string = item[field] === undefined || item[field] === null ? '' : item[field].toString(); return value.includes(filter.key) }))); ======= this.filterInfo = filter; this.fromArray(this._bakData.filter(item => { if(typeof this.filterInfo.field[0] == 'string'){ return !!(<string[]>this.filterInfo.field).filter(field => { return item[field].includes(this.filterInfo.key) }).length }else{ return false } })) >>>>>>> this.fromArray(this._bakData.filter(item => (<any[]>filter.field).find(field => { const value:string = item[field] === undefined || item[field] === null ? '' : item[field].toString(); return value.includes(filter.key) })));
<<<<<<< TableSelectRowDemoModule, TableCheckboxColumnObjectCellDemoModule, TableCalendarDemoModule, BigRowDemoModule, BigColumnDemoModule, TableResizeDemoModule ======= TableSelectRowDemoModule, TableCheckboxColumnObjectCellDemoModule, TableCalendarDemoModule, BigRowDemoModule >>>>>>> TableSelectRowDemoModule, TableCheckboxColumnObjectCellDemoModule, TableCalendarDemoModule, BigRowDemoModule, TableResizeDemoModule
<<<<<<< singleTimeComboValue = [{label: TimeService.getFormatDate(this.date, TimeGr.date), closable: false}]; ======= singleTimeComboValue = new ArrayCollection([{label: TimeService.getFormateDate(this.date, TimeGr.date), closable: false}]); >>>>>>> singleTimeComboValue = new ArrayCollection([{label: TimeService.getFormatDate(this.date, TimeGr.date), closable: false}]); <<<<<<< rangeTimeComboValue = [ {label: TimeService.getFormatDate(this.beginDate, TimeGr.date), closable: false}, {label: TimeService.getFormatDate(this.endDate, TimeGr.date), closable: false} ]; ======= rangeTimeComboValue = new ArrayCollection([ {label: TimeService.getFormateDate(this.beginDate, TimeGr.date), closable: false}, {label: TimeService.getFormateDate(this.endDate, TimeGr.date), closable: false} ]); handleDateChange(value){ this.singleTimeComboValue = new ArrayCollection([{label: value,closable: false}]); } handleDeginDateChange(value){ this.rangeTimeComboValue = new ArrayCollection([{label:value, closable: false}, this.rangeTimeComboValue[1]]); } handleEndDateChange(value){ this.rangeTimeComboValue = new ArrayCollection([this.rangeTimeComboValue[0], {label: value, closable: false}]); } >>>>>>> rangeTimeComboValue = new ArrayCollection([ {label: TimeService.getFormatDate(this.beginDate, TimeGr.date), closable: false}, {label: TimeService.getFormatDate(this.endDate, TimeGr.date), closable: false} ]); handleDateChange(value){ this.singleTimeComboValue = new ArrayCollection([{label: value,closable: false}]); } handleDeginDateChange(value){ this.rangeTimeComboValue = new ArrayCollection([{label:value, closable: false}, this.rangeTimeComboValue[1]]); } handleEndDateChange(value){ this.rangeTimeComboValue = new ArrayCollection([this.rangeTimeComboValue[0], {label: value, closable: false}]); }
<<<<<<< ======= export class ScrollEvent { // 滚动发生的方向, y 或者x direction: string; // 距左部的距离 draggerLeft: number; // 距顶部的距离 draggerTop: number; // 距左侧的百分比 leftPercentage: number; // 内容距离 left: number; // 距顶部的百分比 topPercentage: number; // 内容距离 top: number; // 原本的jquery对象 content: Object } >>>>>>>
<<<<<<< ======= public static toArray(tableData: any): any[] { if (!TableData.isTableData(tableData)) { return []; } return new TableData(tableData.data, tableData.field, tableData.header).toArray(); } } >>>>>>> public static toArray(tableData: any): any[] { if (!TableData.isTableData(tableData)) { return []; } return new TableData(tableData.data, tableData.field, tableData.header).toArray(); }
<<<<<<< * 事件派发器 ======= * 销毁系统 * */ class DestroySystem extends BaseSystem<BaseComponent> { private readonly _bufferedComponents; private readonly _bufferedGameObjects; /** * @inheritDoc */ update(): void; /** * 将实体缓存到销毁系统,以便在系统运行时销毁。 * */ bufferComponent(component: BaseComponent): void; /** * 将实体缓存到销毁系统,以便在系统运行时销毁。 * */ bufferGameObject(gameObject: GameObject): void; } } declare namespace paper { /** * */ interface IHashCode { /** * */ readonly hashCode: number; } /** * */ interface IStruct { /** * */ readonly class: string; } /** * 自定义序列化接口。 */ interface ISerializable { /** * */ serialize(): any | IHashCode | ISerializedObject; /** * */ deserialize(element: any): void; } /** * 序列化后的数据接口。 */ interface ISerializedObject extends IHashCode, IStruct { /** * */ [key: string]: any | IHashCode; } /** * 序列化数据接口 */ interface ISerializedData { /** * */ readonly objects: ISerializedObject[]; /** * */ [key: string]: ISerializedObject[]; } } declare namespace paper { /** * */ class MissComponent extends BaseComponent { /** * */ missingObject: MissingObject; } } declare namespace paper { /** * 序列化方法 * 只有 ISerializable (有对应hashCode属性) 参与序列化 * 只有被标记的对象属性 参与序列化 * 序列化后,输出 ISerializeData * 对象在objects中按生成顺序,root一定是第一个元素。 * 允许依赖标记对序列化对象数据分类,以便单独处理一些对象(例如资源等等,但资源的路径这里不做处理,在方法外由开发者自行处理) */ function serialize(source: SerializableObject, sourcePath?: string): ISerializedData; /** * */ function serializeAsset(source: paper.Asset): any; /** * */ function serializeRC(source: SerializableObject): any; /** * */ function serializeR(source: SerializableObject): any; /** * */ function serializeC(source: SerializableObject): any; /** * */ function getTypesFromPrototype(classPrototype: any, typeKey: string, types?: string[] | null): string[]; } declare namespace paper { /** * renderer component interface * @version paper 1.0 * @platform Web * @language en_US >>>>>>> * 事件派发器 <<<<<<< deserialize(element: any): void; } /** * 序列化后的数据接口。 */ interface ISerializedObject extends IHashCode, IStruct { /** * */ [key: string]: any | IHashCode; } /** * 序列化数据接口 */ interface ISerializedData { /** * */ readonly objects: ISerializedObject[]; /** * */ [key: string]: ISerializedObject[]; } } ======= readonly scene: Scene; } } >>>>>>> deserialize(element: any): void; } /** * 序列化后的数据接口。 */ interface ISerializedObject extends IUUID, IStruct { /** * */ [key: string]: any | IUUID; } /** * 序列化数据接口 */ interface ISerializedData { /** * */ readonly objects: ISerializedObject[]; /** * */ [key: string]: ISerializedObject[]; } } <<<<<<< /** * 序列化方法 * 只有 ISerializable (有对应hashCode属性) 参与序列化 * 只有被标记的对象属性 参与序列化 * 序列化后,输出 ISerializeData * 对象在objects中按生成顺序,root一定是第一个元素。 * 允许依赖标记对序列化对象数据分类,以便单独处理一些对象(例如资源等等,但资源的路径这里不做处理,在方法外由开发者自行处理) */ function serialize(source: SerializableObject, sourcePath?: string): ISerializedData; /** * */ function serializeAsset(source: Asset): any; /** * */ function serializeRC(source: SerializableObject): any; /** * */ function serializeR(source: SerializableObject): any; /** * */ function serializeC(source: SerializableObject): any; /** * */ function getTypesFromPrototype(classPrototype: any, typeKey: string, types?: string[] | null): string[]; ======= /** * 这里暂未实现用户自定义层级,但用户可以使用预留的UserLayer。 * 这个属性可以实现相机的选择性剔除。 */ const enum Layer { Default = 2, UI = 4, UserLayer1 = 8, UserLayer2 = 16, UserLayer3 = 32, UserLayer4 = 64, UserLayer5 = 128, UserLayer6 = 240, UserLayer7 = 256, UserLayer8 = 512, UserLayer9 = 1024, UserLayer10 = 2048, UserLayer11 = 3840, } >>>>>>> /** * 序列化方法 * 只有 ISerializable 参与序列化 * 只有被标记的对象属性 参与序列化 * 序列化后,输出 ISerializeData * 对象在objects中按生成顺序,root一定是第一个元素。 * 允许依赖标记对序列化对象数据分类,以便单独处理一些对象(例如资源等等,但资源的路径这里不做处理,在方法外由开发者自行处理) */ function serialize(source: SerializableObject, sourcePath?: string): ISerializedData; /** * */ function serializeAsset(source: Asset): any; /** * */ function serializeRC(source: SerializableObject): any; /** * */ function serializeR(source: SerializableObject): any; /** * */ function serializeC(source: SerializableObject): any; /** * */ function getTypesFromPrototype(classPrototype: any, typeKey: string, types?: string[] | null): string[]; <<<<<<< * clone a obb * @version paper 1.0 * @platform Web * @language en_US ======= * @inheritDoc */ deserialize(element: number[]): void; } } declare namespace paper { /** * 场景类 */ class Scene extends SerializableObject { /** * 场景名称。 */ name: string; /** * 场景的light map列表。 */ readonly lightmaps: egret3d.Texture[]; /** * 当前场景的所有GameObject对象池 * */ readonly gameObjects: GameObject[]; /** * 存储着关联的数据 * 场景保存时,将场景快照数据保存至对应的资源中 * */ $rawScene: egret3d.RawScene | null; constructor(); /** * 移除GameObject对象 * */ $removeGameObject(gameObject: GameObject): void; /** * 添加一个GameObject对象 * */ $addGameObject(gameObject: GameObject): void; /** * 获取所有根级GameObject对象 */ getRootGameObjects(): GameObject[]; } } declare namespace egret3d { /** * * 贝塞尔曲线,目前定义了三种:线性贝塞尔曲线(两个点形成),二次方贝塞尔曲线(三个点形成),三次方贝塞尔曲线(四个点形成) */ class Curve3 { /** * 贝塞尔曲线上的,不包含第一个点 */ private _beizerPoints; /** * 贝塞尔曲线上所有的个数 */ private _bezierPointNum; beizerPoints: egret3d.Vector3[]; bezierPointNum: number; /** * 线性贝塞尔曲线 */ static CreateLinearBezier(start: egret3d.Vector3, end: egret3d.Vector3, indices: number): Curve3; /** * 二次方贝塞尔曲线路径 * @param v0 起始点 * @param v1 选中的节点 * @param v2 结尾点 * @param nbPoints 将贝塞尔曲线拆分nbPoints段,一共有nbPoints + 1个点 */ static CreateQuadraticBezier(v0: egret3d.Vector3, v1: egret3d.Vector3, v2: egret3d.Vector3, bezierPointNum: number): Curve3; /** * 三次方贝塞尔曲线路径 * @param v0 * @param v1 * @param v2 * @param v3 * @param nbPoints */ static CreateCubicBezier(v0: egret3d.Vector3, v1: egret3d.Vector3, v2: egret3d.Vector3, v3: egret3d.Vector3, bezierPointNum: number): Curve3; constructor(points: egret3d.Vector3[], nbPoints: number); /** * 贝塞尔曲线上的点 */ getPoints(): Vector3[]; } } declare namespace egret3d { /** * */ const RAD_DEG: number; /** * */ const DEG_RAD: number; function floatClamp(v: number, min?: number, max?: number): number; function sign(value: number): number; function numberLerp(fromV: number, toV: number, v: number): number; function calPlaneLineIntersectPoint(planeVector: Vector3, planePoint: Vector3, lineVector: Vector3, linePoint: Vector3, out: Vector3): Vector3; function getPointAlongCurve(curveStart: Vector3, curveStartHandle: Vector3, curveEnd: Vector3, curveEndHandle: Vector3, t: number, out: Vector3, crease?: number): void; } declare namespace egret3d { class Angelref { v: number; } class Matrix3x2 { rawData: Float32Array; constructor(datas?: Float32Array); static multiply(lhs: Matrix3x2, rhs: Matrix3x2, out: Matrix3x2): Matrix3x2; static fromRotate(angle: number, out: Matrix3x2): Matrix3x2; static fromScale(xScale: number, yScale: number, out: Matrix3x2): Matrix3x2; static fromTranslate(x: number, y: number, out: Matrix3x2): Matrix3x2; static fromRTS(pos: Vector2, scale: Vector2, rot: number, out: Matrix3x2): void; static transformVector2(mat: Matrix, inp: Vector2, out: Vector2): Vector2; static transformNormal(mat: Matrix, inp: Vector2, out: Vector2): Vector2; static inverse(src: Matrix3x2, out: Matrix3x2): Matrix3x2; static identify(out: Matrix3x2): Matrix3x2; static copy(src: Matrix3x2, out: Matrix3x2): Matrix3x2; static decompose(src: Matrix3x2, scale: Vector2, rotation: Angelref, translation: Vector2): boolean; } } declare namespace egret3d { /** * obb box * @version paper 1.0 * @platform Web * @language en_US */ /** * 定向包围盒 * @version paper 1.0 * @platform Web * @language zh_CN */ class OBB extends paper.SerializableObject { /** * center * @version paper 1.0 * @platform Web * @language en_US */ /** * 包围盒中心 * @version paper 1.0 * @platform Web * @language zh_CN */ readonly center: Vector3; /** * size * @version paper 1.0 * @platform Web * @language en_US */ /** * 包围盒各轴向长 * @version paper 1.0 * @platform Web * @language zh_CN */ readonly size: Vector3; /** * vectors * @version paper 1.0 * @platform Web * @language en_US */ /** * 包围盒世界空间下各个点坐标 * @version paper 1.0 * @platform Web * @language zh_CN */ readonly vectors: Readonly<[Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3]>; private readonly _directions; private _computeBoxExtents(axis, box, out); private _axisOverlap(axis, a, b); /** * clone a obb * @version paper 1.0 * @platform Web * @language en_US >>>>>>> * clone a obb * @version paper 1.0 * @platform Web * @language en_US <<<<<<< interface ICameraPostQueue { /** * */ ======= function clone<T extends paper.SerializableObject>(object: T): T; } declare namespace egret3d { /** * Light系统 */ class LightSystem extends paper.BaseSystem<Light> { /** * @inheritDoc */ protected readonly _interests: { componentClass: typeof Light; }[]; /** * @inheritDoc */ update(): void; } } declare namespace egret3d { class PointLightShadow implements ILightShadow { renderTarget: GlRenderTargetCube; map: WebGLTexture; bias: number; radius: number; matrix: Matrix; windowSize: number; camera: Camera; private _targets; private _ups; constructor(); update(light: Light, face: number): void; private _updateCamera(light, face); private _updateMatrix(); } } declare namespace egret3d { class SpotLightShadow implements ILightShadow { >>>>>>> interface ICameraPostQueue { /** * */ <<<<<<< * @inheritDoc ======= * 起始帧。 */ private _frameStart; /** * 总帧数。 >>>>>>> * @inheritDoc <<<<<<< static createGLTFAsset(): GLTFAsset; ======= update(globalTime: number): void; fadeIn(animationName: string | null, fadeTime: number, playTimes?: number, layer?: number, additive?: boolean): AnimationState | null; play(animationNameOrNames?: string | string[] | null, playTimes?: number): AnimationState | null; readonly lastAnimationnName: string; >>>>>>> static createGLTFAsset(): GLTFAsset; <<<<<<< playTimes: number; ======= static pause(): void; static resume(): void; /** * */ static callLater(callback: () => void): void; static readonly isEditor: boolean; static readonly isFocused: boolean; static readonly isPlaying: boolean; static readonly isRunning: boolean; } } declare namespace egret3d.particle { class ParticleSystem extends paper.BaseSystem<ParticleComponent | ParticleRenderer> { >>>>>>> playTimes: number; <<<<<<< declare namespace paper.editor { type EventData<D> = { isUndo: boolean; data: D; ======= declare namespace egret3d { type ProfileItem = { key: string; count: number; startTime: number; time: number; group: number; maxTime: number; >>>>>>> declare namespace paper.editor { type EventData<D> = { isUndo: boolean; data: D;
<<<<<<< import { ExplorerOptions, RequestType, ExplorerValues, GraphApiCall, GraphRequestHeader, Message, SampleQuery, MessageBarContent } from "./base"; ======= import * as moment from "moment"; import { ExplorerOptions, RequestType, ExplorerValues, GraphApiCall, GraphRequestHeader, Message, SampleQuery, MessageBarContent, GraphApiVersions, GraphApiVersion } from "./base"; >>>>>>> import { ExplorerOptions, RequestType, ExplorerValues, GraphApiCall, GraphRequestHeader, Message, SampleQuery, MessageBarContent, GraphApiVersions, GraphApiVersion } from "./base";
<<<<<<< const loginResponse = await login(); if (loginResponse) { ======= const loginSuccess = await login(); if (loginSuccess) { >>>>>>> const loginSuccess = await login(); if (loginSuccess) { <<<<<<< AppComponent.explorerValues.authentication.status = 'authenticated'; this.changeDetectorRef.detectChanges(); ======= >>>>>>> AppComponent.explorerValues.authentication.status = 'authenticated'; this.changeDetectorRef.detectChanges();
<<<<<<< it("should ignore generics", async () => { const output = await Compiler.compile(join(fixtures, "ignore-generics.ts"), {ignoreGenerics: true, ignoreIndexSignature: false}); const expected = await readFile(join(fixtures, "ignore-generics-ti.ts"), {encoding: "utf8"}); assert.deepEqual(output, expected); }); it("should ignore index signature", async () => { const output = await Compiler.compile(join(fixtures, "ignore-index-signature.ts"), {ignoreGenerics: false, ignoreIndexSignature: true}); const expected = await readFile(join(fixtures, "ignore-index-signature-ti.ts"), {encoding: "utf8"}); assert.deepEqual(output, expected); }); ======= it("should compile Array", async () => { const output = await Compiler.compile(join(fixtures, "array.ts")); const expected = await readFile(join(fixtures, "array-ti.ts"), {encoding: "utf8"}); assert.deepEqual(output, expected); }); >>>>>>> it("should ignore generics", async () => { const output = await Compiler.compile(join(fixtures, "ignore-generics.ts"), {ignoreGenerics: true, ignoreIndexSignature: false}); const expected = await readFile(join(fixtures, "ignore-generics-ti.ts"), {encoding: "utf8"}); assert.deepEqual(output, expected); }); it("should ignore index signature", async () => { const output = await Compiler.compile(join(fixtures, "ignore-index-signature.ts"), {ignoreGenerics: false, ignoreIndexSignature: true}); const expected = await readFile(join(fixtures, "ignore-index-signature-ti.ts"), {encoding: "utf8"}); assert.deepEqual(output, expected); }); it("should compile Array", async () => { const output = await Compiler.compile(join(fixtures, "array.ts")); const expected = await readFile(join(fixtures, "array-ti.ts"), {encoding: "utf8"}); assert.deepEqual(output, expected); });
<<<<<<< import { BN } from 'ethereumjs-util' import { Block } from '@ethereumjs/block' ======= import { BN, toBuffer } from 'ethereumjs-util' >>>>>>> import { BN } from 'ethereumjs-util' import { Block } from '@ethereumjs/block' <<<<<<< const txContext = new TxContext(tx.gasPrice.toArrayLike(Buffer), caller) const to = tx.to && tx.to.buf.length !== 0 ? tx.to.buf : undefined ======= const txContext = new TxContext(new BN(tx.gasPrice), tx.getSenderAddress()) >>>>>>> const txContext = new TxContext(tx.gasPrice, caller) const to = tx.to && tx.to.buf.length !== 0 ? tx.to.buf : undefined
<<<<<<< const connection = new ChromeConnection(getChromeTargetWebSocketURL, opts.targetFilter); this._debugAdapter = opts.adapter || new ChromeDebugAdapter( connection, new LineNumberTransformer(targetLinesStartAt1), new SourceMapTransformer(), new PathTransformer()); ======= const logFilePath = opts.logFilePath; >>>>>>> this._debugAdapter = opts.adapter; <<<<<<< ======= this._adapterProxy = new AdapterProxy( [ new LineNumberTransformer(targetLinesStartAt1), new SourceMapTransformer(), new PathTransformer() ], opts.adapter, event => this.sendEvent(event)); opts.adapter.registerRequestHandler(this.sendRequest.bind(this)); >>>>>>>
<<<<<<< ======= import {formatConsoleMessage, formatExceptionDetails} from './consoleHelper'; >>>>>>>
<<<<<<< // As of 0.1.0, the included .d.ts is not in the right format to use the import syntax here // https://github.com/florinn/typemoq/issues/4 // const typemoq: ITypeMoqStatic = require('typemoq'); import { Mock, MockBehavior, It, IMock, Times } from 'typemoq'; ======= import { Mock, MockBehavior, It } from 'typemoq'; >>>>>>> import { Mock, MockBehavior, It, IMock, Times } from 'typemoq'; <<<<<<< .setup(x => x.targetUrlToClientPath(It.isValue(undefined), It.isValue(TARGET_URL))) .returns(() => CLIENT_PATH) .verifiable(Times.atLeastOnce()); ======= .setup(x => x.targetUrlToClientPath2(It.isValue(TARGET_URL), It.isValue(undefined))) .returns(() => CLIENT_PATH).verifiable(); >>>>>>> .setup(x => x.targetUrlToClientPath2(It.isValue(TARGET_URL), It.isValue(undefined))) .returns(() => CLIENT_PATH).verifiable(Times.atLeastOnce()); <<<<<<< .setup(x => x.targetUrlToClientPath(It.isValue(undefined), It.isValue(TARGET_URL))) .returns(() => '') .verifiable(Times.atLeastOnce()); ======= .setup(x => x.targetUrlToClientPath2(It.isValue(TARGET_URL), It.isValue(undefined))) .returns(() => '').verifiable(); >>>>>>> .setup(x => x.targetUrlToClientPath2(It.isValue(TARGET_URL), It.isValue(undefined))) .returns(() => '').verifiable(Times.atLeastOnce());
<<<<<<< import {LineNumberTransformer} from '../transformers/lineNumberTransformer'; import {PathTransformer} from '../transformers/pathTransformer'; import {SourceMapTransformer} from '../transformers/sourceMapTransformer'; import {spawn, ChildProcess} from 'child_process'; ======= >>>>>>> import {LineNumberTransformer} from '../transformers/lineNumberTransformer'; import {PathTransformer} from '../transformers/pathTransformer'; import {SourceMapTransformer} from '../transformers/sourceMapTransformer'; <<<<<<< private _lineNumberTransformer: LineNumberTransformer; private _sourceMapTransformer: SourceMapTransformer; private _pathTransformer: PathTransformer; public constructor(chromeConnection: ChromeConnection, lineNumberTransformer: LineNumberTransformer, sourceMapTransformer: SourceMapTransformer, pathTransformer: PathTransformer) { this._chromeConnection = chromeConnection; ======= public constructor(chromeConnection?: ChromeConnection) { this._chromeConnection = chromeConnection || new ChromeConnection(); >>>>>>> private _lineNumberTransformer: LineNumberTransformer; private _sourceMapTransformer: SourceMapTransformer; private _pathTransformer: PathTransformer; public constructor(chromeConnection?: ChromeConnection) { this._chromeConnection = chromeConnection || new ChromeConnection(); <<<<<<< public launch(args: ILaunchRequestArgs): Promise<void> { this._sourceMapTransformer.launch(args); this._pathTransformer.launch(args); this.setupLogging(args); // Check exists? const chromePath = args.runtimeExecutable || utils.getBrowserPath(); if (!chromePath) { return utils.errP(`Can't find Chrome - install it or set the "runtimeExecutable" field in the launch config.`); } // Start with remote debugging enabled const port = args.port || 9222; const chromeArgs: string[] = ['--remote-debugging-port=' + port]; // Also start with extra stuff disabled chromeArgs.push(...['--no-first-run', '--no-default-browser-check']); if (args.runtimeArgs) { chromeArgs.push(...args.runtimeArgs); } if (args.userDataDir) { chromeArgs.push('--user-data-dir=' + args.userDataDir); } let launchUrl: string; if (args.file) { launchUrl = utils.pathToFileURL(args.file); } else if (args.url) { launchUrl = args.url; } if (launchUrl) { chromeArgs.push(launchUrl); } logger.log(`spawn('${chromePath}', ${JSON.stringify(chromeArgs) })`); this._chromeProc = spawn(chromePath, chromeArgs, { detached: true, stdio: ['ignore'] }); this._chromeProc.unref(); this._chromeProc.on('error', (err) => { logger.log('chrome error: ' + err); this.terminateSession(); }); return this._attach(port, launchUrl, args.address); } ======= public abstract launch(args: ILaunchRequestArgs): Promise<void>; >>>>>>> public launch(args: ILaunchRequestArgs): Promise<void> { this._sourceMapTransformer.launch(args); this._pathTransformer.launch(args); this.setupLogging(args); return Promise.resolve<void>(); }
<<<<<<< export interface UIInitialReporters<BigNumberType> { [initialReporter: string]: InitialReportersRow<BigNumberType>; ======= export interface UIInitialReporters { [initialReporter: string]: InitialReportersRow; } export interface ForkMigrationTotalsRow extends Payout { universe: Address; repTotal: number; } export interface UIForkMigrationTotalsRow extends NormalizedPayout { universe: Address; repTotal: number; } export interface UIForkMigrationTotals { [universe: string]: UIForkMigrationTotalsRow; >>>>>>> export interface UIInitialReporters<BigNumberType> { [initialReporter: string]: InitialReportersRow<BigNumberType>; } export interface ForkMigrationTotalsRow extends Payout { universe: Address; repTotal: number; } export interface UIForkMigrationTotalsRow extends NormalizedPayout { universe: Address; repTotal: number; } export interface UIForkMigrationTotals { [universe: string]: UIForkMigrationTotalsRow;
<<<<<<< export function toError(input: any, options?: IErrorOptions): IError { let ten = i18next.getFixedT('en'); ======= export function toError(input: any, title?: string, options?: IErrorOptions): IError { let ten = getFixedT('en'); >>>>>>> export function toError(input: any, title?: string, options?: IErrorOptions): IError { let ten = i18next.getFixedT('en');
<<<<<<< import { BlockDetail, BlocksRow, MarketsContractAddressRow, ReportingState, Address, FeeWindowState, MarketIdUniverseFeeWindow } from "../types"; ======= import { BlockDetail, BlocksRow, ErrorCallback, MarketsContractAddressRow, ReportingState, Address, FeeWindowState, TransactionHashesRow } from "../types"; >>>>>>> import { BlockDetail, BlocksRow, ErrorCallback, MarketsContractAddressRow, ReportingState, Address, FeeWindowState, MarketIdUniverseFeeWindow, TransactionHashesRow } from "../types"; <<<<<<< import { processLogByName } from "./process-logs"; ======= import { Transaction } from "ethereumjs-blockstream"; >>>>>>> import { processLogByName } from "./process-logs"; import { Transaction } from "ethereumjs-blockstream"; <<<<<<< if (direction === "add") { await processBlockByBlockDetails(trx, augur, block); await dbWritesFunction(trx); } else { logger.info(`block removed: ${parseInt(block.number, 16)} (${block.hash})`); await dbWritesFunction(trx); await db("blocks").transacting(trx).where({ blockHash: block.hash }).del(); // TODO: un-advance time } }); } async function insertBlockRow(db: Knex, blockNumber: number, blockHash: string, timestamp: number) { ======= await processBlockByBlockDetails(trx, augur, block, false); await dbWritesFunction(trx); }); } export function processBlock(db: Knex, augur: Augur, block: BlockDetail, callback: ErrorCallback): void { processQueue.push((next) => processBlockDetailsAndLogs(db, augur, block).then(() => next(null)).catch(callback)); } export function processBlockRemoval(db: Knex, block: BlockDetail, callback: ErrorCallback): void { processQueue.push((next) => _processBlockRemoval(db, block).then(() => next(null)).catch(callback)); } async function insertBlockRow(db: Knex, blockNumber: number, blockHash: string, bulkSync: boolean, timestamp: number) { >>>>>>> if (direction === "add") { await processBlockByBlockDetails(trx, augur, block, bulkSync); await dbWritesFunction(trx); } else { logger.info(`block removed: ${parseInt(block.number, 16)} (${block.hash})`); await dbWritesFunction(trx); await db("transactionHashes").transacting(trx).where({ blockNumber: block.number }).update({ removed: 1 }); await db("blocks").transacting(trx).where({ blockHash: block.hash }).del(); // TODO: un-advance time } }); } async function insertBlockRow(db: Knex, blockNumber: number, blockHash: string, bulkSync: boolean, timestamp: number) { <<<<<<< ======= async function _processBlockRemoval(db: Knex, block: BlockDetail) { const blockNumber = parseInt(block.number, 16); logger.info("block removed:", `${blockNumber}`); const dbWritesPromise = logQueueProcess(block.hash); const dbWritesFunction = await dbWritesPromise; db.transaction(async (trx: Knex.Transaction) => { // TODO: un-advance time await db("blocks").transacting(trx).where({ blockNumber }).del(); await db("transactionHashes").transacting(trx).where({ blockNumber }).update({ removed: 1 }); await dbWritesFunction(trx); }); } >>>>>>> export async function insertTransactionHash(db: Knex, blockNumber: number, transactionHash: string) { const txHashRows: Array<TransactionHashesRow> = await db("transactionHashes").where({ transactionHash }); if (!txHashRows || !txHashRows.length) { await db.insert({ blockNumber, transactionHash }).into("transactionHashes"); } }
<<<<<<< import { updateMarketState } from "./database"; ======= import { augurEmitter } from "../../events"; >>>>>>> import { updateMarketState } from "./database"; import { augurEmitter } from "../../events"; <<<<<<< updateMarketState( db, log.market, trx, log.blockNumber, augur.constants.REPORTING_STATE.DESIGNATED_DISPUTE, (err: Error|null): void => { ======= const marketStateDataToInsert: { [index: string]: string|number|boolean } = { marketID: log.market, reportingState: augur.constants.REPORTING_STATE.DESIGNATED_DISPUTE, blockNumber: log.blockNumber, }; db.transacting(trx).insert(marketStateDataToInsert).returning("marketStateID").into("market_state").asCallback((err: Error|null, marketStateID?: Array<number>): void => { >>>>>>> updateMarketState( db, log.market, trx, log.blockNumber, augur.constants.REPORTING_STATE.DESIGNATED_DISPUTE, (err: Error|null): void => { <<<<<<< db.transacting(trx).insert({marketID: log.market, stakeToken: log.stakeToken}).into("reports_designated").asCallback(callback); ======= insertStakeToken(db, trx, log.stakeToken, log.market, log.payoutNumerators, (err: Error|null) => { if (err) return callback(err); const designatedReportDataToInsert = {marketID: log.market, stakeToken: log.stakeToken}; augurEmitter.emit("DesignatedReportSubmitted", designatedReportDataToInsert); db.transacting(trx).insert({marketID: log.market, stakeToken: log.stakeToken}).into("reports_designated").asCallback(callback); }); >>>>>>> db.transacting(trx).insert({marketID: log.market, stakeToken: log.stakeToken}).into("reports_designated").asCallback(callback);
<<<<<<< table.string("tradeGroupId", 66); ======= table.boolean("orphaned").defaultTo(0); table.string("tradeGroupId", 42); >>>>>>> table.boolean("orphaned").defaultTo(0); table.string("tradeGroupId", 66);
<<<<<<< MarketCreated: makeLogListener(augur, "Augur", "MarketCreated"), TokensTransferred: makeLogListener(augur, "Augur", "TokensTransferred"), OrderCanceled: makeLogListener(augur, "Augur", "OrderCanceled"), OrderCreated: makeLogListener(augur, "Augur", "OrderCreated"), OrderFilled: makeLogListener(augur, "Augur", "OrderFilled"), TradingProceedsClaimed: makeLogListener(augur, "Augur", "TradingProceedsClaimed"), DesignatedReportSubmitted: makeLogListener(augur, "Augur", "DesignatedReportSubmitted"), ReportSubmitted: makeLogListener(augur, "Augur", "ReportSubmitted"), WinningTokensRedeemed: makeLogListener(augur, "Augur", "WinningTokensRedeemed"), ReportsDisputed: makeLogListener(augur, "Augur", "ReportsDisputed"), MarketFinalized: makeLogListener(augur, "Augur", "MarketFinalized"), feeWindowCreated: makeLogListener(augur, "Augur", "FeeWindowCreated"), UniverseForked: makeLogListener(augur, "Augur", "UniverseForked"), TimestampSet: makeLogListener(augur, "Augur", "TimestampSet"), ======= MarketCreated: makeLogListener(db, augur, "Augur", "MarketCreated"), TokensTransferred: makeLogListener(db, augur, "Augur", "TokensTransferred"), TokensMinted: makeLogListener(db, augur, "Augur", "TokensMinted"), TokensBurned: makeLogListener(db, augur, "Augur", "TokensBurned"), OrderCanceled: makeLogListener(db, augur, "Augur", "OrderCanceled"), OrderCreated: makeLogListener(db, augur, "Augur", "OrderCreated"), OrderFilled: makeLogListener(db, augur, "Augur", "OrderFilled"), TradingProceedsClaimed: makeLogListener(db, augur, "Augur", "TradingProceedsClaimed"), DesignatedReportSubmitted: makeLogListener(db, augur, "Augur", "DesignatedReportSubmitted"), ReportSubmitted: makeLogListener(db, augur, "Augur", "ReportSubmitted"), WinningTokensRedeemed: makeLogListener(db, augur, "Augur", "WinningTokensRedeemed"), ReportsDisputed: makeLogListener(db, augur, "Augur", "ReportsDisputed"), MarketFinalized: makeLogListener(db, augur, "Augur", "MarketFinalized"), feeWindowCreated: makeLogListener(db, augur, "Augur", "FeeWindowCreated"), UniverseForked: makeLogListener(db, augur, "Augur", "UniverseForked"), TimestampSet: makeLogListener(db, augur, "Augur", "TimestampSet"), >>>>>>> MarketCreated: makeLogListener(augur, "Augur", "MarketCreated"), TokensTransferred: makeLogListener(augur, "Augur", "TokensTransferred"), TokensMinted: makeLogListener(augur, "Augur", "TokensMinted"), TokensBurned: makeLogListener(augur, "Augur", "TokensBurned"), OrderCanceled: makeLogListener(augur, "Augur", "OrderCanceled"), OrderCreated: makeLogListener(augur, "Augur", "OrderCreated"), OrderFilled: makeLogListener(augur, "Augur", "OrderFilled"), TradingProceedsClaimed: makeLogListener(augur, "Augur", "TradingProceedsClaimed"), DesignatedReportSubmitted: makeLogListener(augur, "Augur", "DesignatedReportSubmitted"), ReportSubmitted: makeLogListener(augur, "Augur", "ReportSubmitted"), WinningTokensRedeemed: makeLogListener(augur, "Augur", "WinningTokensRedeemed"), ReportsDisputed: makeLogListener(augur, "Augur", "ReportsDisputed"), MarketFinalized: makeLogListener(augur, "Augur", "MarketFinalized"), feeWindowCreated: makeLogListener(augur, "Augur", "FeeWindowCreated"), UniverseForked: makeLogListener(augur, "Augur", "UniverseForked"), TimestampSet: makeLogListener(augur, "Augur", "TimestampSet"),
<<<<<<< import * as Knex from "knex"; import { FormattedLog } from "../types"; import { logProcessors } from "./log-processors"; ======= import { Database } from "sqlite3"; import { makeLogListener } from "./make-log-listener"; import { onNewBlock } from "./on-new-block"; >>>>>>> import * as Knex from "knex"; import { FormattedLog } from "../types"; import { logProcessors } from "./log-processors"; import { makeLogListener } from "./make-log-listener"; import { onNewBlock } from "./on-new-block"; <<<<<<< }, (blockNumber: string): void => { augur.rpc.eth.getBlockByNumber([blockNumber, false], (block: any): void => { if (!block || block.error || !block.timestamp) return logError(new Error(JSON.stringify(block))); console.log("new block received:", parseInt(blockNumber, 16), parseInt(block.timestamp, 16)); const dataToInsertOrReplace: (string|number)[] = [parseInt(blockNumber, 16), parseInt(block.timestamp, 16)]; db.insert({block_number: parseInt(blockNumber, 16), bloc_timestamp: parseInt(block.timestamp)}) .into("block") .asCallback(logError); }); }, callback); ======= }, (blockNumber: string): void => onNewBlock(db, augur, blockNumber), callback); >>>>>>> }, (blockNumber: string): void => onNewBlock(db, augur, blockNumber), callback);
<<<<<<< export async function processTradingProceedsClaimedLog(db: Knex, augur: Augur, log: FormattedEventLog) { const tradingProceedsToInsert = formatBigNumberAsFixed({ marketId: log.market, shareToken: log.shareToken, account: log.sender, numShares: log.numShares, numPayoutTokens: log.numPayoutTokens, blockNumber: log.blockNumber, transactionHash: log.transactionHash, logIndex: log.logIndex, }); await db("trading_proceeds").insert(tradingProceedsToInsert); const shareTokenOutcome: ShareTokenOutcome = await db("tokens").first("outcome").where({ contractAddress: log.shareToken}); const marketData: MarketData = await db.first(["numTicks", "minPrice", "maxPrice"]).from("markets").where({ marketId: log.market }); const minPrice = marketData.minPrice; const maxPrice = marketData.maxPrice; const numTicks = marketData.numTicks; const tickSize = numTicksToTickSize(numTicks, minPrice, maxPrice); const numShares = new BigNumber(log.numShares, 10).dividedBy(tickSize).dividedBy(10**18); const payoutTokens = new BigNumber(log.numPayoutTokens).dividedBy(10**18); await updateProfitLossSellShares(db, log.market, numShares, log.sender, [shareTokenOutcome.outcome], payoutTokens, log.transactionHash); augurEmitter.emit(SubscriptionEventNames.TradingProceedsClaimed, log); ======= export async function processTradingProceedsClaimedLog(augur: Augur, log: FormattedEventLog) { return async (db: Knex) => { const tradingProceedsToInsert = formatBigNumberAsFixed({ marketId: log.market, shareToken: log.shareToken, account: log.sender, numShares: log.numShares, numPayoutTokens: log.numPayoutTokens, blockNumber: log.blockNumber, transactionHash: log.transactionHash, logIndex: log.logIndex, }); await db("trading_proceeds").insert(tradingProceedsToInsert); augurEmitter.emit(SubscriptionEventNames.TradingProceedsClaimed, log); }; >>>>>>> export async function processTradingProceedsClaimedLog(augur: Augur, log: FormattedEventLog) { return async (db: Knex) => { const tradingProceedsToInsert = formatBigNumberAsFixed({ marketId: log.market, shareToken: log.shareToken, account: log.sender, numShares: log.numShares, numPayoutTokens: log.numPayoutTokens, blockNumber: log.blockNumber, transactionHash: log.transactionHash, logIndex: log.logIndex, }); await db("trading_proceeds").insert(tradingProceedsToInsert); const shareTokenOutcome: ShareTokenOutcome = await db("tokens").first("outcome").where({ contractAddress: log.shareToken}); const marketData: MarketData = await db.first(["numTicks", "minPrice", "maxPrice"]).from("markets").where({ marketId: log.market }); const minPrice = marketData.minPrice; const maxPrice = marketData.maxPrice; const numTicks = marketData.numTicks; const tickSize = numTicksToTickSize(numTicks, minPrice, maxPrice); const numShares = new BigNumber(log.numShares, 10).dividedBy(tickSize).dividedBy(10**18); const payoutTokens = new BigNumber(log.numPayoutTokens).dividedBy(10**18); await updateProfitLossSellShares(db, log.market, numShares, log.sender, [shareTokenOutcome.outcome], payoutTokens, log.transactionHash); augurEmitter.emit(SubscriptionEventNames.TradingProceedsClaimed, log); };
<<<<<<< const query = db.select("marketId").from("markets").where({ marketCreator: creator }).where({ universe }); queryModifier(db, query, "volume", "desc", sortBy, isSortDescending, limit, offset, (err: Error|null, rows?: Array<MarketsContractAddressRow>): void => { ======= let query = db.select("marketId").from("markets"); query.join("blocks", "blocks.blockNumber", "markets.creationBlockNumber" ); query.where({ marketCreator: creator }); query.where({ universe }); if (earliestCreationTime != null) query.where("blocks.timestamp", ">=", earliestCreationTime); if (latestCreationTime != null) query.where("blocks.timestamp", "<=", latestCreationTime); query = queryModifier(query, "volume", "desc", sortBy, isSortDescending, limit, offset); query.asCallback((err: Error|null, rows?: Array<MarketsContractAddressRow>): void => { >>>>>>> const query = db.select("marketId").from("markets"); query.join("blocks", "blocks.blockNumber", "markets.creationBlockNumber" ); query.where({ marketCreator: creator }); query.where({ universe }); if (earliestCreationTime != null) query.where("blocks.timestamp", ">=", earliestCreationTime); if (latestCreationTime != null) query.where("blocks.timestamp", "<=", latestCreationTime); queryModifier(db, query, "volume", "desc", sortBy, isSortDescending, limit, offset, (err: Error|null, rows?: Array<MarketsContractAddressRow>): void => {
<<<<<<< address: Address; blockNumber: Int256; transactionIndex: Int256; transactionHash: Bytes32; blockHash: Bytes32; [inputName: string]: any; ======= address: Address, blockNumber: number, transactionIndex: Int256, transactionHash: Bytes32, blockHash: Bytes32, [inputName: string]: any >>>>>>> address: Address; blockNumber: number; transactionIndex: Int256; transactionHash: Bytes32; blockHash: Bytes32; [inputName: string]: any; <<<<<<< market_id: Address; universe: Address; market_type: string; num_outcomes: number; min_price: number; max_price: number; market_creator: Address; creation_time: number; creation_block_number: number; creation_fee: number; market_creator_fee_rate: number; market_creator_fees_collected: number|null; topic: string; tag1: string|null; tag2: string|null; volume: number; shares_outstanding: number; reporting_window: Address; end_time: number; finalization_time: number|null; short_description: string; long_description: string|null; designated_reporter: Address; resolution_source: string|null; ======= market_id: Address, universe: Address, market_type: string, num_outcomes: number, min_price: number, max_price: number, market_creator: Address, creation_time: number, creation_block_number: number, creation_fee: number, market_creator_fee_rate: number, market_creator_fees_collected: number|null, topic: string, tag1: string|null, tag2: string|null, volume: number, shares_outstanding: number, reporting_window: Address, end_time: number, finalization_time: number|null, short_description: string, long_description: string|null, designated_reporter: Address, resolution_source: string|null, num_ticks: number >>>>>>> market_id: Address; universe: Address; market_type: string; num_outcomes: number; min_price: number; max_price: number; market_creator: Address; creation_time: number; creation_block_number: number; creation_fee: number; market_creator_fee_rate: number; market_creator_fees_collected: number|null; topic: string; tag1: string|null; tag2: string|null; volume: number; shares_outstanding: number; reporting_window: Address; end_time: number; finalization_time: number|null; short_description: string; long_description: string|null; designated_reporter: Address; resolution_source: string|null; num_ticks: number; <<<<<<< marketID: Address; universe: Address; marketType: string; numOutcomes: number; minPrice: number; maxPrice: number; marketCreator: Address; creationTime: number; creationBlockNumber: number; creationFee: number; marketCreatorFeeRate: number; marketCreatorFeesCollected: number|null; topic: string; tag1: string|null; tag2: string|null; volume: number; sharesOutstanding: number; reportingWindow: Address; endTime: number; finalizationTime: number|null; shortDescription: string; longDescription: string|null; designatedReporter: Address; resolutionSource: string|null; ======= marketID: Address, universe: Address, marketType: string, numOutcomes: number, minPrice: number, maxPrice: number, marketCreator: Address, creationTime: number, creationBlockNumber: number, creationFee: number, marketCreatorFeeRate: number, marketCreatorFeesCollected: number|null, topic: string, tag1: string|null, tag2: string|null, volume: number, sharesOutstanding: number, reportingWindow: Address, endTime: number, finalizationTime: number|null, shortDescription: string, longDescription: string|null, designatedReporter: Address, resolutionSource: string|null, numTicks: number } export interface OrdersRow { order_id: Bytes32, market_id: Address, outcome: number, share_token: Address, order_type: string, order_creator: Address, creation_time: number, creation_block_number: number, price: number|string, amount: number|string, full_precision_price: number|string, full_precision_amount: number|string, tokens_escrowed: number|string, shares_escrowed: number|string, better_order_id: Bytes32|null, worse_order_id: Bytes32|null, trade_group_id: Bytes32|null >>>>>>> marketID: Address; universe: Address; marketType: string; numOutcomes: number; minPrice: number; maxPrice: number; marketCreator: Address; creationTime: number; creationBlockNumber: number; creationFee: number; marketCreatorFeeRate: number; marketCreatorFeesCollected: number|null; topic: string; tag1: string|null; tag2: string|null; volume: number; sharesOutstanding: number; reportingWindow: Address; endTime: number; finalizationTime: number|null; shortDescription: string; longDescription: string|null; designatedReporter: Address; resolutionSource: string|null; numTicks: number; } export interface OrdersRow { order_id: Bytes32; market_id: Address; outcome: number; share_token: Address; order_type: string; order_creator: Address; creation_time: number; creation_block_number: number; price: number|string; amount: number|string; full_precision_price: number|string; full_precision_amount: number|string; tokens_escrowed: number|string; shares_escrowed: number|string; better_order_id: Bytes32|null; worse_order_id: Bytes32|null; trade_group_id: Bytes32|null;
<<<<<<< console.log("Waiting for first block..."); getNetworkID(db, augur, (err: Error|null, networkID: string|null) => { if (err) { augur.events.stopListeners(); return callback(err); } augur.rpc.eth.getBlockByNumber(["latest", false], (block: any): void => { db.max("block as highestBlockNumber").from(function(this: Knex.QueryBuilder): void { this.max("highestBlockNumber as block").from("blockchain_sync_history").unionAll(function(this: Knex.QueryBuilder): void { this.max("blockNumber as block").from("blocks"); }).as("maxBlocks"); }).asCallback((err: Error|null, rows?: Array<HighestBlockNumberRow>): void => { ======= startAugurListeners(db, augur, (err: Error|null): void => { if (err) return callback(err); console.log("Started blockchain event listeners", augur.rpc.getCurrentBlock()); getNetworkID(db, augur, (err: Error|null, networkID: string|null) => { if (err) return callback(err); db("blockchain_sync_history").max("blockNumber as highestBlockNumber").asCallback((err: Error|null, rows?: Array<HighestBlockNumberRow>): void => { >>>>>>> console.log("Started blockchain event listeners", augur.rpc.getCurrentBlock()); getNetworkID(db, augur, (err: Error|null, networkID: string|null) => { if (err) return callback(err); augur.rpc.eth.getBlockByNumber(["latest", false], (block: any): void => { db("blockchain_sync_history").max("blockNumber as highestBlockNumber").asCallback((err: Error|null, rows?: Array<HighestBlockNumberRow>): void => { <<<<<<< const fromBlock: number = (!row || !row.highestBlockNumber) ? uploadBlockNumbers[networkID!] : row.highestBlockNumber + 1; const highestBlockNumber: number = parseInt(block.number, 16) - 1; if (fromBlock >= highestBlockNumber) return callback(null); // augur-node is already up-to-date downloadAugurLogs(db, augur, fromBlock, highestBlockNumber, (err?: Error|null): void => { if (err) return callback(err); db.insert({ highestBlockNumber }).into("blockchain_sync_history").asCallback(callback); // TODO: Modify this function (and all calls down to blockstream) to take highestBlockNumber startAugurListeners(db, augur); }); ======= if (row.highestBlockNumber === null) { // sync from scratch const fromBlock = uploadBlockNumbers[networkID!]; const highestBlockNumber: number = parseInt(augur.rpc.getCurrentBlock().number, 16) - 1; if (fromBlock >= highestBlockNumber) return callback(null); // augur-node is already up-to-date downloadAugurLogs(db, augur, fromBlock, highestBlockNumber, (err?: Error|null): void => { if (err) return callback(err); db.insert({ highestBlockNumber }).into("blockchain_sync_history").asCallback(callback); }); } else { callback(new Error("Please clear your augur.db and start over (must sync from scratch until issue #4386 is resolved)")); } >>>>>>> if (row.highestBlockNumber === null) { // sync from scratch const fromBlock: number = (!row || !row.highestBlockNumber) ? uploadBlockNumbers[networkID!] : row.highestBlockNumber + 1; const highestBlockNumber: number = parseInt(augur.rpc.getCurrentBlock().number, 16) - 1; if (fromBlock >= highestBlockNumber) return callback(null); // augur-node is already up-to-date downloadAugurLogs(db, augur, fromBlock, highestBlockNumber, (err?: Error|null): void => { if (err) return callback(err); db.insert({ highestBlockNumber }).into("blockchain_sync_history").asCallback(callback); startAugurListeners(db, augur); }); } else { callback(new Error("Please clear your augur.db and start over (must sync from scratch until issue #4386 is resolved)")); }
<<<<<<< await checkForOrphanedOrders(db, augur, orderData); await updateOutcomeValueFromOrders(db, marketId, outcome, log.transactionHash); const otherOutcomes = Array.from(Array(numOutcomes).keys()); otherOutcomes.splice(outcome, 1); const outcomes = orderTypeLabel === "buy" ? otherOutcomes : [outcome]; await updateProfitLossNumEscrowed(db, marketId, displaySharesEscrowed, log.creator, outcomes, log.transactionHash); ======= await marketPendingOrphanCheck(db, orderData); >>>>>>> await marketPendingOrphanCheck(db, orderData); await updateOutcomeValueFromOrders(db, marketId, outcome, log.transactionHash); const otherOutcomes = Array.from(Array(numOutcomes).keys()); otherOutcomes.splice(outcome, 1); const outcomes = orderTypeLabel === "buy" ? otherOutcomes : [outcome]; await updateProfitLossNumEscrowed(db, marketId, displaySharesEscrowed, log.creator, outcomes, log.transactionHash);
<<<<<<< .catch(err => api.showErrorNotification('Failed to deploy mods', err, { allowReport: (err.code !== 'EPERM') && (err.allowReport !== false), })) ======= .catch(err => { if ((err.code === undefined) && (err.errno !== undefined)) { // unresolved windows error code return api.showErrorNotification('Failed to deploy mods', { error: err, ErrorCode: err.errno }); } return api.showErrorNotification('Failed to deploy mods', err, { allowReport: err.code !== 'EPERM'}); }) >>>>>>> .catch(err => { if ((err.code === undefined) && (err.errno !== undefined)) { // unresolved windows error code return api.showErrorNotification('Failed to deploy mods', { error: err, ErrorCode: err.errno }); } return api.showErrorNotification('Failed to deploy mods', err, { allowReport: (err.code !== 'EPERM') && (err.allowReport !== false), }); })
<<<<<<< const marketsRow: MarketsRow<BigNumber>|undefined = await db.first("minPrice", "maxPrice", "numTicks", "numOutcomes").from("markets").where({ marketId }); if (!marketsRow) throw new Error("market min price, max price, category, and/or num ticks not found"); const minPrice = marketsRow.minPrice!; const maxPrice = marketsRow.maxPrice!; const numTicks = marketsRow.numTicks!; const numOutcomes = marketsRow.numOutcomes!; ======= const marketsRow: MarketsRow<BigNumber>|undefined = await db.first("minPrice", "maxPrice", "numTicks").from("markets").where({ marketId }); if (!marketsRow) throw new Error(`market not found: ${marketId}`); const minPrice = marketsRow.minPrice; const maxPrice = marketsRow.maxPrice; const numTicks = marketsRow.numTicks; >>>>>>> const marketsRow: MarketsRow<BigNumber>|undefined = await db.first("minPrice", "maxPrice", "numTicks", "numOutcomes").from("markets").where({ marketId }); if (!marketsRow) throw new Error(`market not found: ${marketId}`); const minPrice = marketsRow.minPrice!; const maxPrice = marketsRow.maxPrice!; const numTicks = marketsRow.numTicks!; const numOutcomes = marketsRow.numOutcomes!;
<<<<<<< "staked_tokens.isInvalid", "staked_tokens.payout0", "staked_tokens.payout1", "staked_tokens.payout2", "staked_tokens.payout3", "staked_tokens.payout4", "staked_tokens.payout5", "staked_tokens.payout6", "staked_tokens.payout7", ]).from("reports").join("markets", "markets.marketID", "reports.marketID").where({reporter}); if (marketID != null) query.where("reports.marketID", marketID); if (universe != null) query.where("universe", universe); if (reportingWindow != null) query.where("reportingWindow", reportingWindow); query = query.join("staked_tokens", "reports.stakedToken", "staked_tokens.stakedToken"); ======= "stake_tokens.isInvalid", "stake_tokens.payout0", "stake_tokens.payout1", "stake_tokens.payout2", "stake_tokens.payout3", "stake_tokens.payout4", "stake_tokens.payout5", "stake_tokens.payout6", "stake_tokens.payout7", ]).from("reports").join("markets", "markets.marketID", "reports.marketID").where(queryData); query = query.join("stake_tokens", "reports.stakeToken", "stake_tokens.stakeToken"); >>>>>>> "stake_tokens.isInvalid", "stake_tokens.payout0", "stake_tokens.payout1", "stake_tokens.payout2", "stake_tokens.payout3", "stake_tokens.payout4", "stake_tokens.payout5", "stake_tokens.payout6", "stake_tokens.payout7", ]).from("reports").join("markets", "markets.marketID", "reports.marketID").where({reporter}); if (marketID != null) query.where("reports.marketID", marketID); if (universe != null) query.where("universe", universe); if (reportingWindow != null) query.where("reportingWindow", reportingWindow); query = query.join("stake_tokens", "reports.stakeToken", "stake_tokens.stakeToken");
<<<<<<< import { formatBigNumberAsFixed } from "../../../utils/format-big-number-as-fixed"; import { fixedPointToDecimal, onChainSharesToHumanReadableShares, numTicksToTickSize } from "../../../utils/convert-fixed-point-to-decimal"; import { BN_WEI_PER_ETHER } from "../../../constants"; ======= import { convertFixedPointToDecimal, convertNumTicksToTickSize } from "../../../utils/convert-fixed-point-to-decimal"; import { WEI_PER_ETHER } from "../../../constants"; >>>>>>> import { formatBigNumberAsFixed } from "../../../utils/format-big-number-as-fixed"; import { fixedPointToDecimal, numTicksToTickSize } from "../../../utils/convert-fixed-point-to-decimal"; import { BN_WEI_PER_ETHER } from "../../../constants"; <<<<<<< const numCreatorTokens = fixedPointToDecimal(new BigNumber(log.numCreatorTokens, 10), BN_WEI_PER_ETHER); const numCreatorShares = onChainSharesToHumanReadableShares(new BigNumber(log.numCreatorShares, 10), tickSize); const numFillerTokens = fixedPointToDecimal(new BigNumber(log.numFillerTokens, 10), BN_WEI_PER_ETHER); const numFillerShares = onChainSharesToHumanReadableShares(new BigNumber(log.numFillerShares, 10), tickSize); const marketCreatorFees = fixedPointToDecimal(new BigNumber(log.marketCreatorFees, 10), BN_WEI_PER_ETHER); const reporterFees = fixedPointToDecimal(new BigNumber(log.reporterFees, 10), BN_WEI_PER_ETHER); ======= const numCreatorTokens = convertFixedPointToDecimal(log.numCreatorTokens, WEI_PER_ETHER); const numCreatorShares = augur.utils.convertOnChainAmountToDisplayAmount(new BigNumber(log.numCreatorShares, 10), new BigNumber(tickSize, 10)).toFixed(); const numFillerTokens = convertFixedPointToDecimal(log.numFillerTokens, WEI_PER_ETHER); const numFillerShares = augur.utils.convertOnChainAmountToDisplayAmount(new BigNumber(log.numFillerShares, 10), new BigNumber(tickSize, 10)).toFixed(); const marketCreatorFees = convertFixedPointToDecimal(log.marketCreatorFees, WEI_PER_ETHER); const reporterFees = convertFixedPointToDecimal(log.reporterFees, WEI_PER_ETHER); >>>>>>> const numCreatorTokens = fixedPointToDecimal(new BigNumber(log.numCreatorTokens, 10), BN_WEI_PER_ETHER); const numCreatorShares = augur.utils.convertOnChainAmountToDisplayAmount(new BigNumber(log.numCreatorShares, 10), tickSize); const numFillerTokens = fixedPointToDecimal(new BigNumber(log.numFillerTokens, 10), BN_WEI_PER_ETHER); const numFillerShares = augur.utils.convertOnChainAmountToDisplayAmount(new BigNumber(log.numFillerShares, 10), tickSize); const marketCreatorFees = fixedPointToDecimal(new BigNumber(log.marketCreatorFees, 10), BN_WEI_PER_ETHER); const reporterFees = fixedPointToDecimal(new BigNumber(log.reporterFees, 10), BN_WEI_PER_ETHER);
<<<<<<< export function startAugurListeners(db: Knex, augur: Augur): void { augur.events.startListeners({ ======= export function startAugurListeners(db: Knex, augur: Augur, callback: (err: Error|null) => void): void { augur.events.startBlockListeners({ onAdded: (block: Block): void => processBlock(db, augur, block), onRemoved: (block: Block): void => processBlockRemoval(db, block), }); augur.events.startBlockchainEventListeners({ >>>>>>> export function startAugurListeners(db: Knex, augur: Augur): void { augur.events.startBlockListeners({ onAdded: (block: Block): void => processBlock(db, augur, block), onRemoved: (block: Block): void => processBlockRemoval(db, block), }); augur.events.startBlockchainEventListeners({ <<<<<<< }, (block: Block): void => processBlock(db, augur, block), (block: Block): void => processBlockRemoval(db, block), (): void => {}); ======= }, callback); >>>>>>> }, callback);
<<<<<<< export async function processMintLog(db: Knex, augur: Augur, log: FormattedEventLog) { const value = new BigNumber(log.amount || log.value); const token = log.token || log.address; await db.insert({ transactionHash: log.transactionHash, logIndex: log.logIndex, sender: null, recipient: log.target, value: value.toString(), blockNumber: log.blockNumber, token, }).into("transfers"); await increaseTokenSupply(db, augur, token, value); await increaseTokenBalance(db, augur, token, log.target, value, log); ======= export async function processMintLog(augur: Augur, log: FormattedEventLog) { return async (db: Knex) => { const value = new BigNumber(log.amount || log.value); const token = log.token || log.address; await db.insert({ transactionHash: log.transactionHash, logIndex: log.logIndex, sender: null, recipient: log.target, value: value.toString(), blockNumber: log.blockNumber, token, }).into("transfers"); await increaseTokenSupply(db, augur, token, value); await increaseTokenBalance(db, augur, token, log.target, value); }; >>>>>>> export async function processMintLog(augur: Augur, log: FormattedEventLog) { return async (db: Knex) => { const value = new BigNumber(log.amount || log.value); const token = log.token || log.address; await db.insert({ transactionHash: log.transactionHash, logIndex: log.logIndex, sender: null, recipient: log.target, value: value.toString(), blockNumber: log.blockNumber, token, }).into("transfers"); await increaseTokenSupply(db, augur, token, value); await increaseTokenBalance(db, augur, token, log.target, value, log); }; <<<<<<< export async function processMintLogRemoval(db: Knex, augur: Augur, log: FormattedEventLog) { const value = new BigNumber(log.amount || log.value); const token = log.token || log.address; await db.from("transfers").where({ transactionHash: log.transactionHash, logIndex: log.logIndex }).del(); await decreaseTokenSupply(db, augur, token, value); await decreaseTokenBalance(db, augur, token, log.target, value, log); await updateProfitLossRemoveRow(db, log.transactionHash); ======= export async function processMintLogRemoval(augur: Augur, log: FormattedEventLog) { return async (db: Knex) => { const value = new BigNumber(log.amount || log.value); const token = log.token || log.address; await db.from("transfers").where({ transactionHash: log.transactionHash, logIndex: log.logIndex }).del(); await decreaseTokenSupply(db, augur, token, value); await decreaseTokenBalance(db, augur, token, log.target, value); }; >>>>>>> export async function processMintLogRemoval(augur: Augur, log: FormattedEventLog) { return async (db: Knex) => { const value = new BigNumber(log.amount || log.value); const token = log.token || log.address; await db.from("transfers").where({ transactionHash: log.transactionHash, logIndex: log.logIndex }).del(); await decreaseTokenSupply(db, augur, token, value); await decreaseTokenBalance(db, augur, token, log.target, value, log); await updateProfitLossRemoveRow(db, log.transactionHash); };
<<<<<<< import { getProfitLoss } from "./getters/get-profit-loss"; ======= import { getWinningBalance } from "./getters/get-winning-balance"; >>>>>>> import { getProfitLoss } from "./getters/get-profit-loss"; import { getWinningBalance } from "./getters/get-winning-balance";
<<<<<<< private _serializer: Serializer<T> = this._getSerializer(); ======= private _afterNextPatchBroadcasts: Array<[any, BroadcastOptions]> = []; // when a new user connects, it receives the '_previousState', which holds // the last binary snapshot other users already have, therefore the patches // that follow will be the same for all clients. private _previousState: any; private _previousStateEncoded: any; >>>>>>> private _serializer: Serializer<T> = this._getSerializer(); private _afterNextPatchBroadcasts: Array<[any, BroadcastOptions]> = []; <<<<<<< this._patchInterval = setInterval(this.broadcastPatch.bind(this), milliseconds); ======= this._patchInterval = setInterval( () => { this.broadcastPatch(); this.broadcastAfterPatch(); }, milliseconds ); >>>>>>> this._patchInterval = setInterval( () => { this.broadcastPatch(); this.broadcastAfterPatch(); }, milliseconds );
<<<<<<< initPeriodicPageCheck(); ======= Lib.FocusVisible.init(); KeyboardShortcutListener.init(); RequestIntercepter.startInterceptingFetch(); StatusReport.initRegularStatusReport(); >>>>>>> initPeriodicPageCheck(); Lib.FocusVisible.init(); KeyboardShortcutListener.init(); RequestIntercepter.startInterceptingFetch(); StatusReport.initRegularStatusReport();
<<<<<<< }, await presence.getSetting('lang')), browsingStamp = Math.floor(Date.now() / 1000); let strings = getStrings(), oldLang: string = null; ======= }, await presence.getSetting("lang") ), browsingStamp = Math.floor(Date.now() / 1000); let strings: Promise<LangStrings> = getStrings(), oldLang: string = null; >>>>>>> }, await presence.getSetting("lang") ), browsingStamp = Math.floor(Date.now() / 1000); let strings = getStrings(), oldLang: string = null; <<<<<<< searchQuery: boolean = await presence.getSetting("searchQuery"), logo = ["iqiyi_logo", "iqiyi_logo_b"][await presence.getSetting("logo")]; ======= searchQuery: boolean = await presence.getSetting("searchQuery"); >>>>>>> searchQuery: boolean = await presence.getSetting("searchQuery"), logo = ["iqiyi_logo", "iqiyi_logo_b"][await presence.getSetting("logo")]; <<<<<<< const presenceData: PresenceData = { largeImageKey: logo, details: (await strings).browse, smallImageKey: "search", smallImageText: (await strings).browse, startTimestamp: browsingStamp }; if (document.location.pathname.includes('/play') || document.location.pathname.includes("/intl-common/")){ const data = { title: (document.querySelector('h1 a') || document.querySelector('title'))?.textContent, ep: (document.querySelector('h1') || document.querySelector(".topice-source-list-item.item-active"))?.textContent.replace(document.querySelector('h1 a')?.textContent || "", '') ======= if ( document.location.pathname.includes("/play") || document.location.pathname.includes("/intl-common/") ) { const data = { title: ( document.querySelector("h1 a") || document.querySelector("title") )?.textContent, ep: ( document.querySelector("h1") || document.querySelector(".topice-source-list-item.item-active") )?.textContent.replace( document.querySelector("h1 a")?.textContent || "", "" ) >>>>>>> const presenceData: PresenceData = { largeImageKey: logo, details: (await strings).browse, smallImageKey: "search", smallImageText: (await strings).browse, startTimestamp: browsingStamp }; if ( document.location.pathname.includes("/play") || document.location.pathname.includes("/intl-common/") ) { const data = { title: ( document.querySelector("h1 a") || document.querySelector("title") )?.textContent, ep: ( document.querySelector("h1") || document.querySelector(".topice-source-list-item.item-active") )?.textContent.replace( document.querySelector("h1 a")?.textContent || "", "" )
<<<<<<< import Promise from 'bluebird'; import NexusT, { IFeedbackResponse } from 'nexus-api'; ======= import * as Promise from 'bluebird'; import NexusT, { IFeedbackResponse } from '@nexusmods/nexus-api'; >>>>>>> import Promise from 'bluebird'; import NexusT, { IFeedbackResponse } from '@nexusmods/nexus-api';
<<<<<<< import Network, { DiscoveryRequest } from './Network' import NetworkPeer, { encodePeerId } from './NetworkPeer' import { Swarm, JoinOptions } from './SwarmInterface' import { PeerMsg } from './PeerMsg' ======= import Network, { Swarm } from './Network' import { PeerId } from './NetworkPeer' >>>>>>> import Network, { DiscoveryRequest } from './Network' import NetworkPeer, { encodePeerId, PeerId } from './NetworkPeer' import { Swarm, JoinOptions } from './SwarmInterface' import { PeerMsg } from './PeerMsg' <<<<<<< feeds: FeedStore ======= keys: KeyStore store: FeedStore >>>>>>> feeds: FeedStore keys: KeyStore <<<<<<< id: Buffer network: Network messages: MessageCenter<PeerMsg> ======= id: RepoId swarmKey: Buffer // TODO: Remove this once we no longer use discovery-swarm/discovery-cloud >>>>>>> id: RepoId network: Network messages: MessageCenter<PeerMsg> swarmKey: Buffer // TODO: Remove this once we no longer use discovery-swarm/discovery-cloud <<<<<<< this.feeds = new FeedStore(this.storageFn) this.files = new FileStore(this.feeds) ======= // initialize storage if (!opts.memory) { ensureDirectoryExists(this.path) } >>>>>>> // initialize storage if (!opts.memory) { ensureDirectoryExists(this.path) } <<<<<<< this.id = this.meta.id this.network = new Network(encodePeerId(this.id)) this.messages = new MessageCenter('HypermergeMessages', this.network) this.messages.inboxQ.subscribe(this.onMessage) this.network.discoveryQ.subscribe(this.onDiscovery) this.network.peerQ.subscribe(this.onPeer) this.feeds.feedIdQ.subscribe((feedId) => { this.network.join(toDiscoveryId(feedId)) }) ======= this.network = new Network(toPeerId(this.id), this.store) >>>>>>> this.network = new Network(toPeerId(this.id)) this.messages = new MessageCenter('HypermergeMessages', this.network) this.messages.inboxQ.subscribe(this.onMessage) this.network.discoveryQ.subscribe(this.onDiscovery) this.network.peerQ.subscribe(this.onPeer) this.feeds.feedIdQ.subscribe((feedId) => { this.network.join(toDiscoveryId(feedId)) }) <<<<<<< // TODO(jeff): This needs to be added back // // Broadcast latest document information to peers. // const blocks = this.meta.forActor(actor.id) // const docs = this.meta.docsWith(actor.id) // const clocks = this.clocks.getMultiple(docs) // this.meta.docsWith(actor.id).forEach((documentId) => { // this.messages.sendToDiscoveryId(toDiscoveryId(documentId), { // type: 'RemoteMetadata', // blocks, // clocks, // }) // }) ======= // Broadcast latest document information to peers. const metadata = this.meta.forActor(actor.id) const docs = this.meta.docsWith(actor.id) const clocks = this.clocks.getMultiple(this.id, docs) docs.forEach((documentId) => { const documentActor = this.actor(rootActorId(documentId as DocId)) if (documentActor) { DocumentBroadcast.broadcastMetadata(metadata, clocks, documentActor.peers.values()) } }) >>>>>>> // TODO(jeff): This needs to be added back // // Broadcast latest document information to peers. // const blocks = this.meta.forActor(actor.id) // const docs = this.meta.docsWith(actor.id) // const clocks = this.clocks.getMultiple(this.id, docs) // this.meta.docsWith(actor.id).forEach((documentId) => { // this.messages.sendToDiscoveryId(toDiscoveryId(documentId), { // type: 'RemoteMetadata', // blocks, // clocks, // }) // }) <<<<<<< ======= case 'PeerAdd': { // Listen for hypermerge extension broadcasts. DocumentBroadcast.listen(msg.peer, this.broadcastNotify) // Broadcast the latest document information to the new peer const metadata = this.meta.forActor(msg.actor.id) const docs = this.meta.docsWith(msg.actor.id) const clocks = this.clocks.getMultiple(this.id, docs) DocumentBroadcast.broadcastMetadata(metadata, clocks, [msg.peer]) break } >>>>>>>
<<<<<<< ======= export type ClockUpdate = [RepoId, DocId, Clock.Clock] >>>>>>> <<<<<<< update(repoId: RepoId, documentId: DocId, clock: Clock.Clock): ClockDescriptor { ======= update(repoId: RepoId, documentId: DocId, clock: Clock.Clock): ClockUpdate { >>>>>>> update(repoId: RepoId, documentId: DocId, clock: Clock.Clock): ClockDescriptor { <<<<<<< return [updatedClock, documentId, repoId] ======= const descriptor: ClockUpdate = [repoId, documentId, updatedClock] if (!Clock.equal(clock, updatedClock)) { this.updateQ.push(descriptor) } return descriptor >>>>>>> return [updatedClock, documentId, repoId] <<<<<<< set(repoId: RepoId, documentId: DocId, clock: Clock.Clock): ClockDescriptor { ======= set(repoId: RepoId, documentId: DocId, clock: Clock.Clock): ClockUpdate { >>>>>>> set(repoId: RepoId, documentId: DocId, clock: Clock.Clock): ClockDescriptor {
<<<<<<< code += (cell.text + "\n"); ======= let cellText = this._magicsRewriter.rewrite(cell.value.text); code += (cellText + "\n"); >>>>>>> code += (cell.text + "\n"); let cellText = this._magicsRewriter.rewrite(cell.text); code += (cellText + "\n"); <<<<<<< private _cells: SliceableCell<TCellModel, TOutputModel>[]; ======= private _cells: ICodeCellModel[]; private _magicsRewriter: MagicsRewriter = new MagicsRewriter(); >>>>>>> private _cells: SliceableCell<TCellModel, TOutputModel>[]; private _magicsRewriter: MagicsRewriter = new MagicsRewriter();
<<<<<<< doSaveActivation(api, mod.type, dataPath, stagingPath, newActivation, activator.id)); ======= doSaveActivation(api, mod.type, dataPath, newActivation, activator.id)) .catch(err => { api.showErrorNotification('Failed to deploy mod', err, { message: modId, }); }); >>>>>>> doSaveActivation(api, mod.type, dataPath, stagingPath, newActivation, activator.id)) .catch(err => { api.showErrorNotification('Failed to deploy mod', err, { message: modId, }); });
<<<<<<< import {setInstanceId, setWarnedAdmin} from '../actions/app'; ======= import {setApplicationVersion, setInstanceId} from '../actions/app'; >>>>>>> import {setApplicationVersion, setInstanceId, setWarnedAdmin} from '../actions/app'; <<<<<<< .then(() => this.warnAdmin()) ======= .then(() => this.checkUpgrade()) >>>>>>> .then(() => this.warnAdmin()) .then(() => this.checkUpgrade()) <<<<<<< private warnAdmin(): Promise<void> { const state: IState = this.mStore.getState(); if (state.app.warnedAdmin > 0) { return Promise.resolve(); } return isAdmin() .then(admin => { if (!admin) { return Promise.resolve(); } return new Promise((resolve, reject) => { dialog.showMessageBox(null, { title: 'Admin rights detected', message: 'Vortex is not intended to be run as administrator!\n' + 'If you\'re doing this because you have permission problems, please ' + 'stop, you\'re just making it worse.\n' + 'File permissions can be changed, so that the tools can be run with a ' + 'regular account. ' + 'Vortex will try its best to help you with that.\n' + 'If you choose to continue I won\'t bother you again but please ' + 'don\'t report any permission problems to us because they are ' + 'of your own making.', buttons: [ 'Quit', 'Ignore', ], noLink: true, }, (response: number) => { if (response === 0) { app.quit(); } else { this.mStore.dispatch(setWarnedAdmin(1)); resolve(); } }); }); }); } ======= private checkUpgrade() { const state: IState = this.mStore.getState(); if (state.app.appVersion !== app.getVersion()) { log('info', 'Vortex was updated, checking for necessary migrations'); return migrate(this.mStore) .then(() => { this.mStore.dispatch(setApplicationVersion(app.getVersion())); }); } else { return Promise.resolve(); } } >>>>>>> private warnAdmin(): Promise<void> { const state: IState = this.mStore.getState(); if (state.app.warnedAdmin > 0) { return Promise.resolve(); } return isAdmin() .then(admin => { if (!admin) { return Promise.resolve(); } return new Promise((resolve, reject) => { dialog.showMessageBox(null, { title: 'Admin rights detected', message: 'Vortex is not intended to be run as administrator!\n' + 'If you\'re doing this because you have permission problems, please ' + 'stop, you\'re just making it worse.\n' + 'File permissions can be changed, so that the tools can be run with a ' + 'regular account. ' + 'Vortex will try its best to help you with that.\n' + 'If you choose to continue I won\'t bother you again but please ' + 'don\'t report any permission problems to us because they are ' + 'of your own making.', buttons: [ 'Quit', 'Ignore', ], noLink: true, }, (response: number) => { if (response === 0) { app.quit(); } else { this.mStore.dispatch(setWarnedAdmin(1)); resolve(); } }); }); }); } private checkUpgrade() { const state: IState = this.mStore.getState(); if (state.app.appVersion !== app.getVersion()) { log('info', 'Vortex was updated, checking for necessary migrations'); return migrate(this.mStore) .then(() => { this.mStore.dispatch(setApplicationVersion(app.getVersion())); }); } else { return Promise.resolve(); } }
<<<<<<< public lookupChanged() { this.signaler.signal('lookup-changed'); } ======= public expandableChanged() { this.signaler.signal('expandable-changed'); } >>>>>>> public expandableChanged() { this.signaler.signal('expandable-changed'); } public lookupChanged() { this.signaler.signal('lookup-changed'); }
<<<<<<< export const DATA_EXIT_CONTAINER = 'data-exit-container' export const DATA_IS_GESTURE_CONTROLLED = 'data-is-gesture-controlled' ======= export const DATA_EXIT_CONTAINER = 'data-exit-container' export const DATA_IS_APPEARING = 'data-is-appearing' >>>>>>> export const DATA_EXIT_CONTAINER = 'data-exit-container' export const DATA_IS_GESTURE_CONTROLLED = 'data-is-gesture-controlled' export const DATA_IS_APPEARING = 'data-is-appearing'
<<<<<<< isGestureControlled?: boolean ======= onComplete?: (flipIds: FlippedIds) => void >>>>>>> isGestureControlled?: boolean onComplete?: (flipIds: FlippedIds) => void
<<<<<<< Welcome, ServerSettings ======= RoomList, Welcome >>>>>>> Welcome, RoomList, ServerSettings
<<<<<<< import { AnnotationObject } from '../../objects/annotation-object'; ======= import {CanvasEditorDirective} from "../../directives/canvas-editor/canvas-editor"; import { DomSanitizer } from "@angular/platform-browser"; >>>>>>> import { AnnotationObject } from '../../objects/annotation-object'; import {CanvasEditorDirective} from "../../directives/canvas-editor/canvas-editor"; import { DomSanitizer } from "@angular/platform-browser"; <<<<<<< boxes = []; lines = []; polys = []; currentTool = 0; ======= @ViewChild(CanvasEditorDirective) canvasDirective; >>>>>>> boxes = []; lines = []; polys = []; currentTool = 0; @ViewChild(CanvasEditorDirective) canvasDirective; <<<<<<< constructor(public navCtrl: NavController, public navParams: NavParams, public events: Events, ======= constructor(public navParams: NavParams, >>>>>>> constructor(public navParams: NavParams, public events: Events, <<<<<<< this.item = navParams.data; ======= this.item = navParams.data; this.sanitizer = sanitizer; >>>>>>> this.item = navParams.data; this.sanitizer = sanitizer;
<<<<<<< import { HotkeysService, Hotkey } from 'angular2-hotkeys'; import { HotkeyObject } from '../../objects/hotkey-object'; ======= import { DomSanitizer } from "@angular/platform-browser"; import { AnnotationsProvider, Line, Box, Polygon } from "../../providers/annotations/annotations"; >>>>>>> import { HotkeysService, Hotkey } from 'angular2-hotkeys'; import { HotkeyObject } from '../../objects/hotkey-object'; import { DomSanitizer } from "@angular/platform-browser"; import { AnnotationsProvider, Line, Box, Polygon } from "../../providers/annotations/annotations"; <<<<<<< private sanitizer: DomSanitizer, private hotkeyProvider: HotkeyProvider, private hotkeyService: HotkeysService) { ======= private hotkeyProvider: HotkeyProvider, private annotationsProvider: AnnotationsProvider, sanitizer: DomSanitizer) { >>>>>>> private sanitizer: DomSanitizer, private hotkeyProvider: HotkeyProvider, private hotkeyService: HotkeysService, private annotationsProvider: AnnotationsProvider, sanitizer: DomSanitizer) { <<<<<<< this.imageProvider.initImage(currentImagePath as string); this.hotkeyProvider.hotkeys.subscribe(value => { this.updateHotkeys(value); }) } ======= this.imageProvider.initImage(currentImagePath as string, this.annotationsProvider); this.getCurrentAnnotations(); } >>>>>>> this.hotkeyProvider.hotkeys.subscribe(value => { this.updateHotkeys(value); }) this.imageProvider.initImage(currentImagePath as string, this.annotationsProvider); this.getCurrentAnnotations(); } <<<<<<< hotkeySetCanvasDirectiveLine() { this.selectCanvasDirective(this.canvasDirectives.canvas_line); ======= @HostListener('window:keydown', ['$event']) doAction($event) { if($event.key === this.hotkeyProvider.hotkeys.line) { this.hotkeySetCanvasDirectiveLine(); } else if($event.key === this.hotkeyProvider.hotkeys.rectangle) { this.hotkeySetCanvasDirectiveRectangle(); } else if($event.key === this.hotkeyProvider.hotkeys.polygon) { this.hotkeySetCanvasDirectivePolygon(); } } hotkeySetCanvasDirectiveLine() { this.selectCanvasDirective(this.canvasDirectives.canvas_line); >>>>>>> hotkeySetCanvasDirectiveLine() { this.selectCanvasDirective(this.canvasDirectives.canvas_line);
<<<<<<< .get<AlertsResponse>('/notifications/alerts') .then((resp) => ======= .get('/notifications/alerts') .then((resp) => { >>>>>>> .get<AlertsResponse>('/notifications/alerts') .then((resp) => {
<<<<<<< return date.getFullYear() + '-' + date.getMonth().toString().padStart(2, '0') + '-' + date.getDay().toString().padStart(2, '0') + ' ' + date.getHours().toString().padStart(2, '0') + ':' + date.getMinutes().toString().padStart(2, '0'); }; Vue.filter('formatDateTime', formatDateTime); ======= return ( date.getFullYear() + '-' + date .getMonth() .toString() .padStart(2, '0') + '-' + date .getDay() .toString() .padStart(2, '0') + ' ' + date .getHours() .toString() .padStart(2, '0') + ':' + date .getMinutes() .toString() .padStart(2, '0') ); }); >>>>>>> return ( date.getFullYear() + '-' + date .getMonth() .toString() .padStart(2, '0') + '-' + date .getDay() .toString() .padStart(2, '0') + ' ' + date .getHours() .toString() .padStart(2, '0') + ':' + date .getMinutes() .toString() .padStart(2, '0') ); }; Vue.filter('formatDateTime', formatDateTime);
<<<<<<< InitialConfiguration = 'initial-configuration', ======= AddServiceClientAccessRight= 'add-service-client-access-right', >>>>>>> InitialConfiguration = 'initial-configuration', AddServiceClientAccessRight= 'add-service-client-access-right',
<<<<<<< addClientModule, ======= notificationsModule, >>>>>>> addClientModule, notificationsModule,
<<<<<<< ======= function createSortName(client: Client): string { // Create a sort id for client in form "ACMEGOV:1234 MANAGEMENT" if (client.member_name) { return ( client.member_name + client.member_class + client.member_code + ' ' + client.subsystem_code ); } return ( UNKNOWN_NAME + client.member_class + client.member_code + ' ' + client.subsystem_code ); } function createMemberAscSortName(client: Client): string { // Create a sort id for member in form "ACMEGOV:1234" if (client.member_name) { return client.member_name + client.member_class + client.member_code; } return UNKNOWN_NAME + client.member_class + client.member_code; } function createMemberDescSortName(client: Client): string { // Create a sort id for member in form "ACMEGOV:1234!" if (client.member_name) { return client.member_name + client.member_class + client.member_code + '!'; } return UNKNOWN_NAME + client.member_class + client.member_code + '!'; } >>>>>>> <<<<<<< clone.visibleName = clone.member_name || UNKNOWN_NAME; ======= clone.visibleName = clone.member_name || UNKNOWN_NAME; clone.sortNameAsc = createMemberAscSortName(clone); // clone.member_name + clone.member_class + clone.member_code; clone.sortNameDesc = createMemberDescSortName(clone); // clone.member_name + clone.member_class + clone.member_code + '!'; >>>>>>> clone.visibleName = clone.member_name || UNKNOWN_NAME; <<<<<<< const clone = { ...element } as Mutable<ExtendedClient>; // Type Mutable<T> removes readonly from fields ======= const clone = JSON.parse(JSON.stringify(element)) as any; >>>>>>> const clone = JSON.parse(JSON.stringify(element)) as Mutable<ExtendedClient>; // Type Mutable<T> removes readonly from fields <<<<<<< // Create a name from member_name clone.visibleName = clone.member_name || UNKNOWN_NAME; ======= >>>>>>> // Create a name from member_name clone.visibleName = clone.member_name || UNKNOWN_NAME; <<<<<<< ======= // Create a name from member_name clone.visibleName = clone.member_name || UNKNOWN_NAME; clone.sortNameAsc = createMemberAscSortName(clone); clone.sortNameDesc = createMemberDescSortName(clone); >>>>>>> <<<<<<< const clone = { ...element } as ExtendedClient; clone.visibleName = clone.subsystem_code || UNKNOWN_NAME; ======= const clone = JSON.parse(JSON.stringify(element)) as ExtendedClient; clone.visibleName = clone.subsystem_code; >>>>>>> const clone = JSON.parse(JSON.stringify(element)) as ExtendedClient; clone.visibleName = clone.subsystem_code || UNKNOWN_NAME; <<<<<<< ======= clone.sortNameAsc = createSortName(clone); clone.sortNameDesc = createSortName(clone); >>>>>>>
<<<<<<< setArray( array?: ArrayBufferView ): void; setUsage( usage: Usage ): BufferAttribute; ======= setDynamic( dynamic: boolean ): BufferAttribute; >>>>>>> setUsage( usage: Usage ): BufferAttribute;
<<<<<<< register( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader; unregister( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader; ======= setKTX2Loader( ktx2Loader: KTX2Loader ): GLTFLoader; setMeshoptDecoder( meshoptDecoder: /* MeshoptDecoder */ any ): GLTFLoader; >>>>>>> register( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader; unregister( callback: ( parser: GLTFParser ) => GLTFLoaderPlugin ): GLTFLoader; setKTX2Loader( ktx2Loader: KTX2Loader ): GLTFLoader; setMeshoptDecoder( meshoptDecoder: /* MeshoptDecoder */ any ): GLTFLoader;
<<<<<<< import fsPath from 'path'; import fs from "fs"; ======= import fs from 'fs'; >>>>>>> import fsPath from 'path'; import fs from 'fs'; <<<<<<< await scp(ssh, local, remote, dotfiles, concurrency, verbose, recursive); ======= await scp(ssh, local, remote, concurrency, verbose, recursive, rmRemote); >>>>>>> await scp( ssh, local, remote, dotfiles, concurrency, verbose, recursive, rmRemote ); <<<<<<< await putDirectory(ssh, local, remote, dotfiles, concurrency, verbose, recursive); ======= if (rmRemote) { await cleanDirectory(ssh, remote); } await putDirectory( ssh, local, remote, concurrency, verbose, recursive ); >>>>>>> if (rmRemote) { await cleanDirectory(ssh, remote); } await putDirectory( ssh, local, remote, dotfiles, concurrency, verbose, recursive );
<<<<<<< export enum TermsAndPrivacyUrlConstant { TERMSANDCONDITIONSURL = 'https://bitwiser.io/terms-and-conditions', PRIVACYURL = 'https://bitwiser.io/terms-and-conditions' } export enum FirebaseAnalyticsEventConstants { USER_LOGIN = 'user_login', COMPLETED_GAME = 'completed_game', START_NEW_GAME = 'start_new_game', USER_LOCATION = 'user_location' } export enum FirebaseScreenNameConstants { NEW_GAME = 'New Game', ACHIEVEMENTS = 'Achievements', PRIVACY_POLICY = 'Privacy Policy', RECENT_COMPLETED_GAMES = 'Recent Completed Games', DASHBOARD = ' Dashboard', LEADERBOARD = 'Leaderboard', GAME_OVER = 'Game Over', REPORT_GAME = 'Report Game', GAME_CONTINUE = 'Game Continue', GAME_QUESTION = 'Game Question', GAME_DIALOG = 'Game Dialog', INVITE_FRIENDS = 'Invite Friends', FRIEND_LIST = 'Friend List', MY_QUESTIONS = 'My Questions', INVITE_MAIL_FRIENDS = 'Invite Mail Friends', PROFILE_SETTINGS = 'Profile Settings', QUESTION_ADD_UPDATE = 'Question Add Update', LOGIN = 'Login', USER_FEEDBACK = 'User Feedback' } export enum AnalyticsEventConstants { EVENT = 'event', } export enum FirebaseAnalyticsKeyConstants { USER_ID = 'userId', GAME_ID = 'gameId', PLAYER_MODE = 'playerMode', OPPONENT_TYPE = 'opponentType', OTHER_USER_ID = 'otherUserId', USER_SCORE = 'userScore', OTHER_USER_SCORE = 'otherUserScore', GAME_STATUS = 'gameStatus', GAME_MODE = 'gameMode', CATEGORY_IDS = 'categoryIds', TAGS = 'tags', ROUND = 'round', IS_TIE = 'isTie', WINNER_PLAYER_ID = 'winnerPlayerId', LOCATION = 'location' } ======= export enum TermsAndPrivacyUrlConstant { TERMSANDCONDITIONSURL = 'https://bitwiser.io/terms-and-conditions', PRIVACYURL = 'https://bitwiser.io/terms-and-conditions' } export enum GameConstant { SINGLE = 'Single', OPPONENT = 'Opponent', RANDOM = 'Random', FRIEND = 'Friend', COMPUTER = 'Computer', NORMAL = 'Normal', OFFLINE = 'Offline' } export enum FirebaseAnalyticsKeyConstants { USER_ID = 'userId', GAME_ID = 'gameId', PLAYER_MODE = 'playerMode', OPPONENT_TYPE = 'opponentType', OTHER_USER_ID = 'otherUserId', USER_SCORE = 'userScore', OTHER_USER_SCORE = 'otherUserScore', GAME_STATUS = 'gameStatus', GAME_MODE = 'gameMode', CATEGORY_IDS = 'categoryIds', TAGS = 'tags', ROUND = 'round', IS_TIE = 'isTie', WINNER_PLAYER_ID = 'winnerPlayerId', LOCATION = 'location' } export enum FirebaseAnalyticsEventConstants { USER_LOGIN = 'user_login', COMPLETED_GAME = 'completed_game', START_NEW_GAME = 'start_new_game', USER_LOCATION = 'user_location' } export enum FirebaseScreenNameConstants { NEW_GAME = 'New Game', ACHIEVEMENTS = 'Achievements', PRIVACY_POLICY = 'Privacy Policy', RECENT_COMPLETED_GAMES = 'Recent Completed Games', DASHBOARD = ' Dashboard', LEADERBOARD = 'Leaderboard', GAME_OVER = 'Game Over', REPORT_GAME = 'Report Game', GAME_CONTINUE = 'Game Continue', GAME_QUESTION = 'Game Question', GAME_DIALOG = 'Game Dialog', INVITE_FRIENDS = 'Invite Friends', FRIEND_LIST = 'Friend List', MY_QUESTIONS = 'My Questions', INVITE_MAIL_FRIENDS = 'Invite Mail Friends', PROFILE_SETTINGS = 'Profile Settings', QUESTION_ADD_UPDATE = 'Question Add Update', LOGIN = 'Login', USER_FEEDBACK = 'User Feedback' } >>>>>>> export enum TermsAndPrivacyUrlConstant { TERMSANDCONDITIONSURL = 'https://bitwiser.io/terms-and-conditions', PRIVACYURL = 'https://bitwiser.io/terms-and-conditions' } export enum GameConstant { SINGLE = 'Single', OPPONENT = 'Opponent', RANDOM = 'Random', FRIEND = 'Friend', COMPUTER = 'Computer', NORMAL = 'Normal', OFFLINE = 'Offline' } export enum FirebaseAnalyticsKeyConstants { USER_ID = 'userId', GAME_ID = 'gameId', PLAYER_MODE = 'playerMode', OPPONENT_TYPE = 'opponentType', OTHER_USER_ID = 'otherUserId', USER_SCORE = 'userScore', OTHER_USER_SCORE = 'otherUserScore', GAME_STATUS = 'gameStatus', GAME_MODE = 'gameMode', CATEGORY_IDS = 'categoryIds', TAGS = 'tags', ROUND = 'round', IS_TIE = 'isTie', WINNER_PLAYER_ID = 'winnerPlayerId', LOCATION = 'location' } export enum FirebaseAnalyticsEventConstants { USER_LOGIN = 'user_login', COMPLETED_GAME = 'completed_game', START_NEW_GAME = 'start_new_game', USER_LOCATION = 'user_location' } export enum FirebaseScreenNameConstants { NEW_GAME = 'New Game', ACHIEVEMENTS = 'Achievements', PRIVACY_POLICY = 'Privacy Policy', RECENT_COMPLETED_GAMES = 'Recent Completed Games', DASHBOARD = ' Dashboard', LEADERBOARD = 'Leaderboard', GAME_OVER = 'Game Over', REPORT_GAME = 'Report Game', GAME_CONTINUE = 'Game Continue', GAME_QUESTION = 'Game Question', GAME_DIALOG = 'Game Dialog', INVITE_FRIENDS = 'Invite Friends', FRIEND_LIST = 'Friend List', MY_QUESTIONS = 'My Questions', INVITE_MAIL_FRIENDS = 'Invite Mail Friends', PROFILE_SETTINGS = 'Profile Settings', QUESTION_ADD_UPDATE = 'Question Add Update', LOGIN = 'Login', USER_FEEDBACK = 'User Feedback' } export enum AnalyticsEventConstants { EVENT = 'event', }
<<<<<<< export enum GameConstant { SINGLE = 'Single', OPPONENT = 'Opponent', RANDOM = 'Random', FRIEND = 'Friend', COMPUTER = 'Computer', NORMAL = 'Normal', OFFLINE = 'Offline' } export enum FirebaseAnalyticsKeyConstants { USER_ID = 'userId', GAME_ID = 'gameId', PLAYER_MODE = 'playerMode', OPPONENT_TYPE = 'opponentType', OTHER_USER_ID = 'otherUserId', USER_SCORE = 'userScore', OTHER_USER_SCORE = 'otherUserScore', GAME_STATUS = 'gameStatus', GAME_MODE = 'gameMode', CATEGORY_IDS = 'categoryIds', TAGS = 'tags', ROUND = 'round', IS_TIE = 'isTie', WINNER_PLAYER_ID = 'winnerPlayerId', LOCATION = 'location' } export enum FirebaseAnalyticsEventConstants { USER_LOGIN = 'user_login', COMPLETED_GAME = 'completed_game', START_NEW_GAME = 'start_new_game', USER_LOCATION = 'user_location' } export enum FirebaseScreenNameConstants { NEW_GAME = 'New Game', ACHIEVEMENTS = 'Achievements', PRIVACY_POLICY = 'Privacy Policy', RECENT_COMPLETED_GAMES = 'Recent Completed Games', DASHBOARD = ' Dashboard', LEADERBOARD = 'Leaderboard', GAME_OVER = 'Game Over', REPORT_GAME = 'Report Game', GAME_CONTINUE = 'Game Continue', GAME_QUESTION = 'Game Question', GAME_DIALOG = 'Game Dialog', INVITE_FRIENDS = 'Invite Friends', FRIEND_LIST = 'Friend List', MY_QUESTIONS = 'My Questions', INVITE_MAIL_FRIENDS = 'Invite Mail Friends', PROFILE_SETTINGS = 'Profile Settings', QUESTION_ADD_UPDATE = 'Question Add Update', LOGIN = 'Login', USER_FEEDBACK = 'User Feedback' } ======= export enum GoogleLocationAPI { GOOGLE_AUTOCOMPLETE = 'https://maps.googleapis.com/maps/api/place/autocomplete/json', GOOGLE_GEOCODE = 'https://maps.googleapis.com/maps/api/geocode/json' } >>>>>>> export enum GameConstant { SINGLE = 'Single', OPPONENT = 'Opponent', RANDOM = 'Random', FRIEND = 'Friend', COMPUTER = 'Computer', NORMAL = 'Normal', OFFLINE = 'Offline' } export enum FirebaseAnalyticsKeyConstants { USER_ID = 'userId', GAME_ID = 'gameId', PLAYER_MODE = 'playerMode', OPPONENT_TYPE = 'opponentType', OTHER_USER_ID = 'otherUserId', USER_SCORE = 'userScore', OTHER_USER_SCORE = 'otherUserScore', GAME_STATUS = 'gameStatus', GAME_MODE = 'gameMode', CATEGORY_IDS = 'categoryIds', TAGS = 'tags', ROUND = 'round', IS_TIE = 'isTie', WINNER_PLAYER_ID = 'winnerPlayerId', LOCATION = 'location' } export enum FirebaseAnalyticsEventConstants { USER_LOGIN = 'user_login', COMPLETED_GAME = 'completed_game', START_NEW_GAME = 'start_new_game', USER_LOCATION = 'user_location' } export enum FirebaseScreenNameConstants { NEW_GAME = 'New Game', ACHIEVEMENTS = 'Achievements', PRIVACY_POLICY = 'Privacy Policy', RECENT_COMPLETED_GAMES = 'Recent Completed Games', DASHBOARD = ' Dashboard', LEADERBOARD = 'Leaderboard', GAME_OVER = 'Game Over', REPORT_GAME = 'Report Game', GAME_CONTINUE = 'Game Continue', GAME_QUESTION = 'Game Question', GAME_DIALOG = 'Game Dialog', INVITE_FRIENDS = 'Invite Friends', FRIEND_LIST = 'Friend List', MY_QUESTIONS = 'My Questions', INVITE_MAIL_FRIENDS = 'Invite Mail Friends', PROFILE_SETTINGS = 'Profile Settings', QUESTION_ADD_UPDATE = 'Question Add Update', LOGIN = 'Login', USER_FEEDBACK = 'User Feedback' } export enum GoogleLocationAPI { GOOGLE_AUTOCOMPLETE = 'https://maps.googleapis.com/maps/api/place/autocomplete/json', GOOGLE_GEOCODE = 'https://maps.googleapis.com/maps/api/geocode/json' }
<<<<<<< public userActions: UserActions, public cd: ChangeDetectorRef) { this.categoriesObs = store.select(appState.coreState).pipe(select(s => s.categories)); ======= public userActions: UserActions) { this.categoriesObs = store.select(appState.coreState).pipe(select(s => s.categories), take(1)); >>>>>>> public userActions: UserActions, public cd: ChangeDetectorRef) { this.categoriesObs = store.select(appState.coreState).pipe(select(s => s.categories), take(1));
<<<<<<< blogData = []; imageUrl = ''; ======= disableRematchBtn = false; PlayerMode = PlayerMode; >>>>>>> blogData = []; imageUrl = ''; disableRematchBtn = false; PlayerMode = PlayerMode;
<<<<<<< import { UserService, GameService, Utils } from '../../services'; import { switchMap, map, distinct, mergeMap, filter, take } from 'rxjs/operators'; import { empty, of, Observable } from 'rxjs'; ======= import { UserService, GameService } from '../../services'; import { switchMap, map, distinct, mergeMap, filter, take, debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { empty } from 'rxjs'; >>>>>>> import { UserService, GameService, Utils } from '../../services'; import { switchMap, map, distinct, mergeMap, filter, take, debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { empty } from 'rxjs'; <<<<<<< ======= @Effect() loadAddressUsingLatLong = this.actions$ .pipe(ofType(UserActions.LOAD_ADDRESS_USING_LAT_LONG)) .pipe( switchMap((action: ActionWithPayload<any>) => this.svc.getAddressByLatLang(action.payload).pipe( map((result: any) => this.userActions.loadAddressUsingLatLongSuccess(result)) )) ); @Effect() loadAddressSuggestions = this.actions$ .pipe(ofType(UserActions.LOAD_ADDRESS_SUGGESTIONS)) .pipe( debounceTime(2000), distinctUntilChanged(), switchMap((action: ActionWithPayload<any>) => this.svc.getAddressSuggestions(action.payload).pipe( map((result: any) => this.userActions.loadAddressSuggestionsSuccess(result)) )) ); >>>>>>> @Effect() loadAddressUsingLatLong = this.actions$ .pipe(ofType(UserActions.LOAD_ADDRESS_USING_LAT_LONG)) .pipe( switchMap((action: ActionWithPayload<any>) => this.svc.getAddressByLatLang(action.payload).pipe( map((result: any) => this.userActions.loadAddressUsingLatLongSuccess(result)) )) ); @Effect() loadAddressSuggestions = this.actions$ .pipe(ofType(UserActions.LOAD_ADDRESS_SUGGESTIONS)) .pipe( debounceTime(2000), distinctUntilChanged(), switchMap((action: ActionWithPayload<any>) => this.svc.getAddressSuggestions(action.payload).pipe( map((result: any) => this.userActions.loadAddressSuggestionsSuccess(result)) )) );
<<<<<<< ======= import admin from '../db/firebase.client'; >>>>>>> <<<<<<< private static blogFireStoreClient = admin.firestore(); ======= private static blogFireStoreClient = admin.firestore(); >>>>>>> private static blogFireStoreClient = admin.firestore(); <<<<<<< const batch = this.blogFireStoreClient.batch(); ======= try { const batch = this.blogFireStoreClient.batch(); >>>>>>> try { const batch = this.blogFireStoreClient.batch();
<<<<<<< import { isPlatformBrowser } from '@angular/common'; ======= import { User, UserStatusConstants, CollectionConstants, TriggerConstants } from 'shared-library/shared/model'; import { AngularFireDatabase } from '@angular/fire/database'; >>>>>>> import { isPlatformBrowser } from '@angular/common'; import { User, UserStatusConstants, CollectionConstants, TriggerConstants } from 'shared-library/shared/model'; import { AngularFireDatabase } from '@angular/fire/database'; <<<<<<< @Inject(PLATFORM_ID) private platformId: Object, private windowsRef: WindowRef) { } ======= private windowsRef: WindowRef, private db: AngularFireDatabase) { } >>>>>>> @Inject(PLATFORM_ID) private platformId: Object, private windowsRef: WindowRef, private db: AngularFireDatabase) { }
<<<<<<< this.subscription.push(this.store.select(appState.coreState).pipe(take(1)).subscribe(s => this.user = s.user)); ======= this.subs.push(this.store.select(appState.coreState).pipe(take(1)).subscribe(s => { this.user = s.user; this.cd.markForCheck(); })); >>>>>>> this.subscription.push(this.store.select(appState.coreState).pipe(take(1)).subscribe(s => { this.user = s.user; this.cd.markForCheck(); })); <<<<<<< this.subscription.push(this.categoriesObs.subscribe(categories => this.categories = categories)); this.subscription.push(this.tagsObs.subscribe(tags => this.tags = tags)); ======= this.subs.push(this.categoriesObs.subscribe(categories => { this.categories = categories; this.cd.markForCheck(); })); this.subs.push(this.tagsObs.subscribe(tags => { this.tags = tags; this.cd.markForCheck(); })); >>>>>>> this.subscription.push(this.categoriesObs.subscribe(categories => { this.categories = categories; this.cd.markForCheck(); })); this.subscription.push(this.tagsObs.subscribe(tags => { this.tags = tags; this.cd.markForCheck(); }));
<<<<<<< import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'; ======= import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { MatSnackBar } from '@angular/material'; >>>>>>> import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { MatSnackBar } from '@angular/material'; <<<<<<< import { MatSnackBar } from '@angular/material'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe'; ======= >>>>>>>
<<<<<<< export * from './game.reducer'; export * from './bulk-upload.reducer'; ======= export * from './game.reducer'; export interface CoreState { user: User; authInitialized: boolean; categories: Category[]; tags: string[]; questionsSearchResults: SearchResults; unpublishedQuestions: Question[]; userPublishedQuestions: Question[]; userUnpublishedQuestions: Question[]; questionOfTheDay: Question; questionSaveStatus: string; loginRedirectUrl: string; activeGames: Game[]; } export const reducer: ActionReducerMap<CoreState> = { user: user, authInitialized: authInitialized, categories: categories, tags: tags, questionsSearchResults: questionsSearchResults, unpublishedQuestions: unpublishedQuestions, userPublishedQuestions: userPublishedQuestions, userUnpublishedQuestions: userUnpublishedQuestions, questionOfTheDay: questionOfTheDay, questionSaveStatus: questionSaveStatus, loginRedirectUrl: loginRedirectUrl, activeGames: activeGames }; //Features export const coreState = createFeatureSelector<CoreState>('core'); >>>>>>> export * from './game.reducer'; export * from './bulk-upload.reducer'; export interface CoreState { user: User; authInitialized: boolean; categories: Category[]; tags: string[]; questionsSearchResults: SearchResults; unpublishedQuestions: Question[]; userPublishedQuestions: Question[]; userUnpublishedQuestions: Question[]; questionOfTheDay: Question; questionSaveStatus: string; loginRedirectUrl: string; activeGames: Game[]; } export const reducer: ActionReducerMap<CoreState> = { user: user, authInitialized: authInitialized, categories: categories, tags: tags, questionsSearchResults: questionsSearchResults, unpublishedQuestions: unpublishedQuestions, userPublishedQuestions: userPublishedQuestions, userUnpublishedQuestions: userUnpublishedQuestions, questionOfTheDay: questionOfTheDay, questionSaveStatus: questionSaveStatus, loginRedirectUrl: loginRedirectUrl, activeGames: activeGames }; //Features export const coreState = createFeatureSelector<CoreState>('core');
<<<<<<< import { FriendInviteComponent } from './friend-invite/friend-invite.component'; import { GameInviteComponent } from './game-invite/game-invite.component'; ======= import { InviteMailFriendsComponent } from './invite-mail-friends/invite-mail-friends.component'; >>>>>>> import { FriendInviteComponent } from './friend-invite/friend-invite.component'; import { GameInviteComponent } from './game-invite/game-invite.component'; import { InviteMailFriendsComponent } from './invite-mail-friends/invite-mail-friends.component'; <<<<<<< UserCardComponent, FriendInviteComponent, GameInviteComponent ======= >>>>>>> FriendInviteComponent, GameInviteComponent <<<<<<< UserCardComponent, FriendInviteComponent, GameInviteComponent ======= >>>>>>> FriendInviteComponent, GameInviteComponent