-
Notifications
You must be signed in to change notification settings - Fork 675
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to hammerhead 9.0.0. Separate replicators (part of #524). Bump…
… version. (#555) * Switch to hammerhead v9.0.0 * Use separate instances for server and client replicator * Bump version.
- Loading branch information
1 parent
b6c02ad
commit c73bd3c
Showing
6 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
.../command-executors/execute-client-code.js → ...nd-executors/execute-client-code/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/client/driver/command-executors/execute-client-code/replicator.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Replicator from 'replicator'; | ||
|
||
var identityFn = val => val; | ||
|
||
// NOTE: we will serialize replicator results | ||
// to JSON with a command or command result. | ||
// Therefore there is no need to do additional job here, | ||
// so we use identity functions for serialization. | ||
export default new Replicator({ | ||
serialize: identityFn, | ||
deserialize: identityFn | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
// ------------------------------------------------------------- | ||
// WARNING: this file is used by both the client and the server. | ||
// Do not use any browser or node-specific API! | ||
// ------------------------------------------------------------- | ||
|
||
import { identity } from 'lodash'; | ||
import Replicator from 'replicator'; | ||
|
||
var identityFn = val => val; | ||
|
||
// NOTE: we will serialize replicator results | ||
// to JSON with a command or command result. | ||
// Therefore there is no need to do additional job here, | ||
// so we use identity functions for serialization. | ||
export default new Replicator({ | ||
serialize: identityFn, | ||
deserialize: identityFn | ||
serialize: identity, | ||
deserialize: identity | ||
}); |