@coast-team/mute-core
Advanced tools
Comparing version 10.0.0-experiment-3.1 to 10.0.0-experiment-3.2
336
CHANGELOG.md
@@ -5,4 +5,4 @@ # Change Log | ||
<a name="10.0.0-experiment-3.1"></a> | ||
# [10.0.0-experiment-3.1](https://github.com/coast-team/mute-core/compare/v10.0.0-experiment-3.0...v10.0.0-experiment-3.1) (2019-07-12) | ||
<a name="10.0.0-experiment-3.2"></a> | ||
# [10.0.0-experiment-3.2](https://github.com/coast-team/mute-core/compare/v10.0.0-2.2...v10.0.0-experiment-3.2) (2019-09-25) | ||
@@ -12,330 +12,42 @@ | ||
* **syncmessage:** emit deserialization times of all ops ([00f5dd8](https://github.com/coast-team/mute-core/commit/00f5dd8)) | ||
* **dlsdocument:** change getStats in order to return an object ([f94ec9e](https://github.com/coast-team/mute-core/commit/f94ec9e)) | ||
* **dlsdocument:** implement abstract inherited method getStats ([0448d79](https://github.com/coast-team/mute-core/commit/0448d79)) | ||
* **experimentlogs:** remove stats in logs ([2c20d47](https://github.com/coast-team/mute-core/commit/2c20d47)) | ||
* **handlelocaloperation:** change result type to Op[] ([76452ae](https://github.com/coast-team/mute-core/commit/76452ae)) | ||
* **iexperimentallogs:** remove unused import ([8b47f46](https://github.com/coast-team/mute-core/commit/8b47f46)) | ||
* **syncmessage:** emit deserialization times of all ops ([b0a0bea](https://github.com/coast-team/mute-core/commit/b0a0bea)) | ||
* **test:** fix test for release ([fdb1f76](https://github.com/coast-team/mute-core/commit/fdb1f76)) | ||
<a name="10.0.0-experiment-3.0"></a> | ||
# [10.0.0-experiment-3.0](https://github.com/coast-team/mute-core/compare/v10.0.0-2.0...v10.0.0-experiment-3.0) (2019-07-10) | ||
### Bug Fixes | ||
* **dlsdocument:** change getStats in order to return an object ([037e0ce](https://github.com/coast-team/mute-core/commit/037e0ce)) | ||
* **dlsdocument:** implement abstract inherited method getStats ([23e2db5](https://github.com/coast-team/mute-core/commit/23e2db5)) | ||
* **experimentlogs:** remove stats in logs ([78d32a3](https://github.com/coast-team/mute-core/commit/78d32a3)) | ||
* **handlelocaloperation:** change result type to Op[] ([035399a](https://github.com/coast-team/mute-core/commit/035399a)) | ||
* **iexperimentallogs:** remove unused import ([db7d3a0](https://github.com/coast-team/mute-core/commit/db7d3a0)) | ||
* **test:** fix test for release ([55d19b8](https://github.com/coast-team/mute-core/commit/55d19b8)) | ||
### Features | ||
* **logs:** add loclaOperation in the experiment logs ([01a7b12](https://github.com/coast-team/mute-core/commit/01a7b12)) | ||
* **logs:** add stream to get exepriment logs ([a9c680c](https://github.com/coast-team/mute-core/commit/a9c680c)) | ||
* **logs:** finalize stream in order to collect all information ([2c42eca](https://github.com/coast-team/mute-core/commit/2c42eca)) | ||
* **struct:** add struct field in logs ([f4bfd7d](https://github.com/coast-team/mute-core/commit/f4bfd7d)) | ||
* **fifodlsdocument:** adapt handleLocalOperation for experiment ([771d385](https://github.com/coast-team/mute-core/commit/771d385)) | ||
* **fifodottedlogootsplit:** add a new crdt fifo dotted logootsplit ([e965cb3](https://github.com/coast-team/mute-core/commit/e965cb3)) | ||
* **logs:** add loclaOperation in the experiment logs ([4cbb750](https://github.com/coast-team/mute-core/commit/4cbb750)) | ||
* **logs:** add stream to get exepriment logs ([8157951](https://github.com/coast-team/mute-core/commit/8157951)) | ||
* **logs:** finalize stream in order to collect all information ([9c46bc3](https://github.com/coast-team/mute-core/commit/9c46bc3)) | ||
* **struct:** add struct field in logs ([3657aaa](https://github.com/coast-team/mute-core/commit/3657aaa)) | ||
<a name="10.0.0-experiment-2.0"></a> | ||
# [10.0.0-experiment-2.0](https://github.com/coast-team/mute-core/compare/v10.0.0-experiment-1.0...v10.0.0-experiment-2.0) (2019-05-13) | ||
<a name="10.0.0-2.2"></a> | ||
# [10.0.0-2.2](https://github.com/coast-team/mute-core/compare/v10.0.0-2.1...v10.0.0-2.2) (2019-09-16) | ||
### Features | ||
<a name="10.0.0-2.1"></a> | ||
* **logs:** add loclaOperation in the experiment logs ([d2943e4](https://github.com/coast-team/mute-core/commit/d2943e4)) | ||
# [10.0.0-2.1](https://github.com/coast-team/mute-core/compare/v10.0.0-2.0...v10.0.0-2.1) (2019-09-13) | ||
<a name="10.0.0-experiment-1.0"></a> | ||
# [10.0.0-experiment-1.0](https://github.com/coast-team/mute-core/compare/v10.0.0-experiment...v10.0.0-experiment-1.0) (2019-05-07) | ||
### Bug Fixes | ||
* **experimentlogs:** remove stats in logs ([164a6d8](https://github.com/coast-team/mute-core/commit/164a6d8)) | ||
* **handlelocaloperation:** change result type to Op[] ([e79c1d5](https://github.com/coast-team/mute-core/commit/e79c1d5)) | ||
- **pulsar:** fixed an error ([c0f07d5](https://github.com/coast-team/mute-core/commit/c0f07d5)) | ||
- **pulsar:** removed vector from pulsar crdt ([338dd2a](https://github.com/coast-team/mute-core/commit/338dd2a)) | ||
- **pulsar:** wrong data sent ([effd460](https://github.com/coast-team/mute-core/commit/effd460)) | ||
<a name="10.0.0-experiment"></a> | ||
# [10.0.0-experiment](https://github.com/coast-team/mute-core/compare/v10.0.0-1...v10.0.0-experiment) (2019-04-01) | ||
<a name="9.1.6-experiment-1"></a> | ||
## [9.1.6-experiment-1](https://github.com/coast-team/mute-core/compare/v9.1.6-experiment...v9.1.6-experiment-1) (2019-03-18) | ||
### Bug Fixes | ||
* **test:** fix test for release ([4c30589](https://github.com/coast-team/mute-core/commit/4c30589)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
- **pulsar:** adding Metadata type for pulsar ([4534e46](https://github.com/coast-team/mute-core/commit/4534e46)) | ||
<a name="10.0.0-2.0"></a> | ||
<a name="9.1.6-experiment-1"></a> | ||
## [9.1.6-experiment-1](https://github.com/coast-team/mute-core/compare/v9.1.6-experiment...v9.1.6-experiment-1) (2019-03-18) | ||
### Bug Fixes | ||
* **test:** fix test for release ([4c30589](https://github.com/coast-team/mute-core/commit/4c30589)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6-experiment"></a> | ||
## [9.1.6-experiment](https://github.com/coast-team/mute-core/compare/v9.1.6...v9.1.6-experiment) (2019-03-18) | ||
### Bug Fixes | ||
* **iexperimentallogs:** remove unused import ([2a852a1](https://github.com/coast-team/mute-core/commit/2a852a1)) | ||
### Features | ||
* **logs:** add stream to get exepriment logs ([638993c](https://github.com/coast-team/mute-core/commit/638993c)) | ||
* **logs:** finalize stream in order to collect all information ([158962b](https://github.com/coast-team/mute-core/commit/158962b)) | ||
* **package:** update mute-structs ([8999ac7](https://github.com/coast-team/mute-core/commit/8999ac7)) | ||
* **struct:** add struct field in logs ([96d3482](https://github.com/coast-team/mute-core/commit/96d3482)) | ||
<a name="9.1.6"></a> | ||
## [9.1.6](https://github.com/coast-team/mute-core/compare/v9.1.5...v9.1.6) (2019-01-22) | ||
# [10.0.0-2.0](https://github.com/coast-team/mute-core/compare/v10.0.0-1...v10.0.0-2.0) (2019-07-05) | ||
@@ -342,0 +54,0 @@ |
@@ -7,2 +7,3 @@ import { Observable, Subject } from 'rxjs'; | ||
import { DLSDocService, DLSState } from './DottedLogootSplit'; | ||
import { FIFODLSDocService, FIFODLSState } from './FIFODottedLogootSplit'; | ||
import { LSDocService, LSState } from './LogootSplit'; | ||
@@ -14,2 +15,3 @@ import { Strategy } from './Strategy'; | ||
static createDocService(strat: Strategy, messageIn$: Observable<IMessageIn>, messageOut$: Subject<IMessageOut>, id: number, state: DLSState, collaboratorService: CollaboratorsService): DLSDocService; | ||
static createDocService(strat: Strategy, messageIn$: Observable<IMessageIn>, messageOut$: Subject<IMessageOut>, id: number, state: FIFODLSState, collaboratorService: CollaboratorsService): FIFODLSDocService; | ||
} |
import { SafeAny } from 'safe-any'; | ||
import { RichOperation } from '../core'; | ||
import { DLSRichOperation } from './DottedLogootSplit'; | ||
import { FIFODLSRichOperation } from './FIFODottedLogootSplit'; | ||
import { LSRichOperation } from './LogootSplit'; | ||
@@ -8,3 +9,3 @@ import { Strategy } from './Strategy'; | ||
export declare class RichOperationStrategy { | ||
static fromPlain<Op>(strat: Strategy, o: SafeAny<RichOperation<Op>>): LSRichOperation | DLSRichOperation | null; | ||
static fromPlain<Op>(strat: Strategy, o: SafeAny<RichOperation<Op>>): LSRichOperation | DLSRichOperation | FIFODLSRichOperation | null; | ||
} |
import { SafeAny } from 'safe-any'; | ||
import { StateJSON } from '../core'; | ||
import { DLSState } from './DottedLogootSplit'; | ||
import { FIFODLSState } from './FIFODottedLogootSplit'; | ||
import { LSState } from './LogootSplit/LSState'; | ||
import { Strategy } from './Strategy'; | ||
export declare type StateTypes = LSState | DLSState; | ||
export declare type StateTypes = LSState | DLSState | FIFODLSState; | ||
export declare class StateStrategy { | ||
static fromPlain<Seq, Op>(strat: Strategy, o: SafeAny<StateJSON<Seq, Op>>): LSState | DLSState | null; | ||
static emptyState(strat: Strategy): LSState | DLSState | null; | ||
static fromPlain<Seq, Op>(strat: Strategy, o: SafeAny<StateJSON<Seq, Op>>): LSState | DLSState | FIFODLSState | null; | ||
static emptyState(strat: Strategy): LSState | DLSState | FIFODLSState | null; | ||
static getStr(state: StateTypes): string | undefined; | ||
} |
export declare enum Strategy { | ||
LOGOOTSPLIT = 100, | ||
DOTTEDLOGOOTSPLIT = 101 | ||
DOTTEDLOGOOTSPLIT = 101, | ||
FIFODOTTEDLOGOOTSPLIT = 102 | ||
} |
@@ -5,1 +5,2 @@ export * from './MetaDataService'; | ||
export * from './Logs'; | ||
export * from './Pulsar'; |
@@ -6,2 +6,3 @@ import { Observable, Subject } from 'rxjs'; | ||
import { LogState } from './Logs'; | ||
import { PulsarState } from './Pulsar'; | ||
import { TitleState } from './Title'; | ||
@@ -11,5 +12,6 @@ export declare enum MetaDataType { | ||
FixData = 1, | ||
Logs = 2 | ||
Logs = 2, | ||
Pulsar = 3 | ||
} | ||
export declare type MetaDataState = TitleState | FixDataState | LogState; | ||
export declare type MetaDataState = TitleState | FixDataState | LogState | PulsarState; | ||
export interface MetaDataMessage { | ||
@@ -25,5 +27,6 @@ type: MetaDataType; | ||
private logs; | ||
private pulsar; | ||
private localUpdateSubject; | ||
private remoteUpdateSubject; | ||
constructor(messageIn$: Observable<IMessageIn>, messageOut$: Subject<IMessageOut>, titleState: TitleState, fixDataState: FixDataState, logState: LogState, id: number); | ||
constructor(messageIn$: Observable<IMessageIn>, messageOut$: Subject<IMessageOut>, titleState: TitleState, fixDataState: FixDataState, logState: LogState, pulsarState: PulsarState, id: number); | ||
localUpdate$: Observable<MetaDataMessage>; | ||
@@ -30,0 +33,0 @@ memberJoin$: Observable<number>; |
export { ICollaborator } from './collaborators'; | ||
export { MetaDataMessage, MetaDataType, TitleState, FixDataState, LogState } from './doc'; | ||
export { MetaDataMessage, MetaDataType, TitleState, FixDataState, LogState, PulsarState, } from './doc'; | ||
export { MuteCore, MuteCoreTypes, MuteCoreFactory } from './MuteCore'; | ||
@@ -4,0 +4,0 @@ export { LocalOperation, RemoteOperation } from './logs'; |
@@ -1,2 +0,2 @@ | ||
import { SimpleDotPos } from 'dotted-logootsplit'; | ||
import { DeltaEditableReplicatedList, SimpleDotPos } from 'dotted-logootsplit'; | ||
import { OpEditableReplicatedList } from 'dotted-logootsplit/dist/types/core/op-replicated-list'; | ||
@@ -9,3 +9,3 @@ import { LogootSOperation, LogootSRopes, TextOperation } from 'mute-structs'; | ||
import { BlockOperation } from './crdtImpl/DottedLogootSplit/DLSRichOperation'; | ||
import { FixDataState, LogState, MetaDataMessage, TitleState } from './doc'; | ||
import { FixDataState, LogState, MetaDataMessage, PulsarState, TitleState } from './doc'; | ||
import { LocalOperation, RemoteOperation } from './logs'; | ||
@@ -15,3 +15,3 @@ import { Disposable, IMessageIn, IMessageOut } from './misc'; | ||
import { collaborator as proto } from './proto'; | ||
export declare type MuteCoreTypes = MuteCore<LogootSRopes, LogootSOperation> | MuteCore<OpEditableReplicatedList<SimpleDotPos, string>, BlockOperation>; | ||
export declare type MuteCoreTypes = MuteCore<LogootSRopes, LogootSOperation> | MuteCore<OpEditableReplicatedList<SimpleDotPos, string>, BlockOperation> | MuteCore<DeltaEditableReplicatedList<SimpleDotPos, string>, BlockOperation>; | ||
export interface SessionParameters { | ||
@@ -24,2 +24,3 @@ strategy: Strategy; | ||
metaLogs: LogState; | ||
metaPulsar: PulsarState; | ||
} | ||
@@ -34,3 +35,3 @@ export declare class MuteCore<Seq, Op> extends Disposable { | ||
private _messageIn$; | ||
constructor({ profile, strategy, docContent, metaTitle, metaFixData, metaLogs }: SessionParameters, docServiceMethod: DocServiceStrategyMethod<Seq, Op>); | ||
constructor({ profile, strategy, docContent, metaTitle, metaFixData, metaLogs, metaPulsar, }: SessionParameters, docServiceMethod: DocServiceStrategyMethod<Seq, Op>); | ||
readonly myMuteCoreId: number; | ||
@@ -37,0 +38,0 @@ readonly state: State<Seq, Op>; |
@@ -16,4 +16,5 @@ export declare enum Streams { | ||
METADATA_LOGS = 107, | ||
CRYPTO = 108, | ||
CURSOR = 109 | ||
METADATA_PULSAR = 108, | ||
CRYPTO = 109, | ||
CURSOR = 110 | ||
} | ||
@@ -20,0 +21,0 @@ export interface StreamId { |
@@ -1,3 +0,3 @@ | ||
export { FIFOSync } from './FIFOSync'; | ||
export { FIFODLSSync } from './FIFODLSSync'; | ||
export { LSSync } from './LSSync'; | ||
export { DLSSync } from './DLSSync'; |
{ | ||
"name": "@coast-team/mute-core", | ||
"description": "Core component of MUTE collaborative editor", | ||
"version": "10.0.0-experiment-3.1", | ||
"version": "10.0.0-experiment-3.2", | ||
"main": "./dist/mute-core.node.es5.cjs.js", | ||
@@ -6,0 +6,0 @@ "module": "./dist/mutecore.node.es5.esm.js", |
@@ -6,4 +6,10 @@ import { Observable, Subject } from 'rxjs' | ||
import { IMessageIn, IMessageOut } from '../misc' | ||
import { DLSSync, LSSync } from '../syncImpl' | ||
import { DLSSync, FIFODLSSync, LSSync } from '../syncImpl' | ||
import { DLSDocService, DLSDocument, DLSState, DLSSyncMessage } from './DottedLogootSplit' | ||
import { | ||
FIFODLSDocService, | ||
FIFODLSDocument, | ||
FIFODLSState, | ||
FIFODLSSyncMessage, | ||
} from './FIFODottedLogootSplit' | ||
import { LSDocService, LSDocument, LSState, LSSyncMessage } from './LogootSplit' | ||
@@ -38,2 +44,10 @@ import { Strategy } from './Strategy' | ||
): DLSDocService | ||
static createDocService( | ||
strat: Strategy, | ||
messageIn$: Observable<IMessageIn>, | ||
messageOut$: Subject<IMessageOut>, | ||
id: number, | ||
state: FIFODLSState, | ||
collaboratorService: CollaboratorsService | ||
): FIFODLSDocService | ||
static createDocService<Seq, Op>( | ||
@@ -46,3 +60,3 @@ strat: Strategy, | ||
collaboratorService: CollaboratorsService | ||
): LSDocService | DLSDocService { | ||
): LSDocService | DLSDocService | FIFODLSDocService { | ||
switch (strat) { | ||
@@ -79,3 +93,17 @@ case Strategy.LOGOOTSPLIT: | ||
} | ||
break | ||
case Strategy.FIFODOTTEDLOGOOTSPLIT: | ||
if (state instanceof FIFODLSState) { | ||
const document = new FIFODLSDocument(state.sequenceCRDT) | ||
const sync = new FIFODLSSync( | ||
id, | ||
state.networkClock, | ||
state.vector, | ||
state.remoteOperations, | ||
collaboratorService | ||
) | ||
const syncMessage = new FIFODLSSyncMessage(messageIn$, messageOut$) | ||
return new FIFODLSDocService(id, collaboratorService, document, sync, syncMessage) | ||
} else { | ||
throw new Error('State is not an instanceof DLSState') | ||
} | ||
default: | ||
@@ -82,0 +110,0 @@ throw new Error("This strategy doesn't exist") |
import { SafeAny } from 'safe-any' | ||
import { RichOperation } from '../core' | ||
import { DLSRichOperation } from './DottedLogootSplit' | ||
import { FIFODLSRichOperation } from './FIFODottedLogootSplit' | ||
import { LSRichOperation } from './LogootSplit' | ||
@@ -27,2 +28,5 @@ import { Strategy } from './Strategy' | ||
break | ||
case Strategy.FIFODOTTEDLOGOOTSPLIT: | ||
rop = createRichOperation(FIFODLSRichOperation, o) | ||
break | ||
default: | ||
@@ -29,0 +33,0 @@ rop = null |
import { SafeAny } from 'safe-any' | ||
import { StateJSON } from '../core' | ||
import { DLSState } from './DottedLogootSplit' | ||
import { FIFODLSState } from './FIFODottedLogootSplit' | ||
import { LSState } from './LogootSplit/LSState' | ||
import { Strategy } from './Strategy' | ||
export type StateTypes = LSState | DLSState | ||
export type StateTypes = LSState | DLSState | FIFODLSState | ||
@@ -32,2 +33,5 @@ interface IStateFactory<T> { | ||
break | ||
case Strategy.FIFODOTTEDLOGOOTSPLIT: | ||
state = createState(FIFODLSState, o) | ||
break | ||
default: | ||
@@ -49,2 +53,5 @@ state = null | ||
break | ||
case Strategy.FIFODOTTEDLOGOOTSPLIT: | ||
state = createEmptyState(FIFODLSState) | ||
break | ||
default: | ||
@@ -62,2 +69,4 @@ state = null | ||
return state.sequenceCRDT.concatenated('') | ||
} else if (state instanceof FIFODLSState) { | ||
return state.sequenceCRDT.concatenated('') | ||
} else { | ||
@@ -64,0 +73,0 @@ return undefined |
export enum Strategy { | ||
LOGOOTSPLIT = 100, | ||
DOTTEDLOGOOTSPLIT, | ||
FIFODOTTEDLOGOOTSPLIT, | ||
} |
@@ -5,1 +5,2 @@ export * from './MetaDataService' | ||
export * from './Logs' | ||
export * from './Pulsar' |
@@ -8,2 +8,3 @@ import { Observable, Subject } from 'rxjs' | ||
import { Logs, LogState } from './Logs' | ||
import { Pulsar, PulsarState } from './Pulsar' | ||
import { Title, TitleState } from './Title' | ||
@@ -15,5 +16,6 @@ | ||
Logs, | ||
Pulsar, | ||
} | ||
export type MetaDataState = TitleState | FixDataState | LogState | ||
export type MetaDataState = TitleState | FixDataState | LogState | PulsarState | ||
@@ -37,2 +39,3 @@ export interface MetaDataMessage { | ||
private logs: Logs | ||
private pulsar: Pulsar | ||
@@ -48,2 +51,3 @@ private localUpdateSubject: Subject<MetaDataMessage> | ||
logState: LogState, | ||
pulsarState: PulsarState, | ||
id: number | ||
@@ -56,2 +60,3 @@ ) { | ||
this.logs = new Logs(id, logState) | ||
this.pulsar = new Pulsar(id, pulsarState) | ||
@@ -86,2 +91,10 @@ this.localUpdateSubject = new Subject() | ||
break | ||
case MetaDataType.Pulsar: | ||
this.remoteUpdateSubject.next({ | ||
type: MetaDataType.Pulsar, | ||
data: this.pulsar.handleRemotePulsar(dataObj.id, { | ||
activatePulsar: dataObj.activatePulsar, | ||
}), | ||
}) | ||
break | ||
default: | ||
@@ -126,2 +139,21 @@ console.error('No MetaDataType for type ' + type) | ||
break | ||
case MetaDataType.Pulsar: | ||
const { activatePulsar } = data as PulsarState | ||
this.pulsar.handleLocalPulsar(activatePulsar) | ||
this.remoteUpdateSubject.next({ | ||
type: MetaDataType.Pulsar, | ||
data: this.pulsar.state, | ||
}) | ||
const statePulsar = this.pulsar.state | ||
super.send( | ||
{ | ||
type: MetaDataType.Pulsar, | ||
data: JSON.stringify({ | ||
id: this.pulsar.id, | ||
activatePulsar: statePulsar.activatePulsar, | ||
}), | ||
}, | ||
StreamsSubtype.METADATA_PULSAR | ||
) | ||
break | ||
default: | ||
@@ -154,2 +186,13 @@ console.error('No MetaDataType for type ' + type) | ||
) | ||
const statePulsar = this.pulsar.state | ||
super.send( | ||
{ | ||
type: MetaDataType.Pulsar, | ||
data: JSON.stringify({ | ||
activatePulsar: statePulsar.activatePulsar, | ||
}), | ||
}, | ||
StreamsSubtype.METADATA_PULSAR, | ||
id | ||
) | ||
}) | ||
@@ -156,0 +199,0 @@ } |
export { ICollaborator } from './collaborators' | ||
export { MetaDataMessage, MetaDataType, TitleState, FixDataState, LogState } from './doc' | ||
export { | ||
MetaDataMessage, | ||
MetaDataType, | ||
TitleState, | ||
FixDataState, | ||
LogState, | ||
PulsarState, | ||
} from './doc' | ||
export { MuteCore, MuteCoreTypes, MuteCoreFactory } from './MuteCore' | ||
@@ -4,0 +11,0 @@ export { LocalOperation, RemoteOperation } from './logs' |
@@ -1,2 +0,2 @@ | ||
import { SimpleDotPos } from 'dotted-logootsplit' | ||
import { DeltaEditableReplicatedList, SimpleDotPos } from 'dotted-logootsplit' | ||
import { OpEditableReplicatedList } from 'dotted-logootsplit/dist/types/core/op-replicated-list' | ||
@@ -10,4 +10,12 @@ import { LogootSOperation, LogootSRopes, TextOperation } from 'mute-structs' | ||
import { BlockOperation } from './crdtImpl/DottedLogootSplit/DLSRichOperation' | ||
import { FIFODLSDocService, FIFODLSState } from './crdtImpl/FIFODottedLogootSplit' | ||
import { LSDocService, LSState } from './crdtImpl/LogootSplit' | ||
import { FixDataState, LogState, MetaDataMessage, MetaDataService, TitleState } from './doc' | ||
import { | ||
FixDataState, | ||
LogState, | ||
MetaDataMessage, | ||
MetaDataService, | ||
PulsarState, | ||
TitleState, | ||
} from './doc' | ||
import { LocalOperation, RemoteOperation } from './logs' | ||
@@ -21,2 +29,3 @@ import { Disposable, generateId, IMessageIn, IMessageOut } from './misc' | ||
| MuteCore<OpEditableReplicatedList<SimpleDotPos, string>, BlockOperation> | ||
| MuteCore<DeltaEditableReplicatedList<SimpleDotPos, string>, BlockOperation> | ||
@@ -30,2 +39,3 @@ export interface SessionParameters { | ||
metaLogs: LogState | ||
metaPulsar: PulsarState | ||
} | ||
@@ -50,3 +60,11 @@ | ||
constructor( | ||
{ profile, strategy, docContent, metaTitle, metaFixData, metaLogs }: SessionParameters, | ||
{ | ||
profile, | ||
strategy, | ||
docContent, | ||
metaTitle, | ||
metaFixData, | ||
metaLogs, | ||
metaPulsar, | ||
}: SessionParameters, | ||
docServiceMethod: DocServiceStrategyMethod<Seq, Op> | ||
@@ -84,2 +102,3 @@ ) { | ||
metaLogs, | ||
metaPulsar, | ||
muteCoreId | ||
@@ -241,4 +260,22 @@ ) | ||
) | ||
case Strategy.FIFODOTTEDLOGOOTSPLIT: | ||
return new MuteCore<DeltaEditableReplicatedList<SimpleDotPos, string>, BlockOperation>( | ||
constructorParam, | ||
(strat, messageIn$, messageOut$, id, state, collaboratorService): FIFODLSDocService => { | ||
if (state instanceof FIFODLSState) { | ||
return DocServiceStrategy.createDocService( | ||
strat, | ||
messageIn$, | ||
messageOut$, | ||
id, | ||
state, | ||
collaboratorService | ||
) | ||
} else { | ||
throw new Error('') | ||
} | ||
} | ||
) | ||
} | ||
} | ||
} |
@@ -17,2 +17,3 @@ export enum Streams { | ||
METADATA_LOGS, | ||
METADATA_PULSAR, | ||
CRYPTO, | ||
@@ -19,0 +20,0 @@ CURSOR, |
@@ -1,3 +0,3 @@ | ||
export { FIFOSync } from './FIFOSync' | ||
export { FIFODLSSync } from './FIFODLSSync' | ||
export { LSSync } from './LSSync' | ||
export { DLSSync } from './DLSSync' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7153609
153
61479