Compare commits
11 Commits
v13.0.0-8
...
v13.0.0-12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbfd377622 | ||
|
|
3ca260e0da | ||
|
|
edb5e4f719 | ||
|
|
be3b8b65ce | ||
|
|
d093ef56c8 | ||
|
|
90b2a895b8 | ||
|
|
4f57c91b82 | ||
|
|
3e1d89253f | ||
|
|
03e1a3fc12 | ||
|
|
5c33f41c30 | ||
|
|
65e8c29b33 |
@@ -4,8 +4,8 @@
|
|||||||
<!-- quill does not include dist files! We are using the hosted version instead -->
|
<!-- quill does not include dist files! We are using the hosted version instead -->
|
||||||
<!--link rel="stylesheet" href="../bower_components/quill/dist/quill.snow.css" /-->
|
<!--link rel="stylesheet" href="../bower_components/quill/dist/quill.snow.css" /-->
|
||||||
<link href="https://cdn.quilljs.com/1.0.4/quill.snow.css" rel="stylesheet">
|
<link href="https://cdn.quilljs.com/1.0.4/quill.snow.css" rel="stylesheet">
|
||||||
<link href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css" rel="stylesheet">
|
||||||
<link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/monokai-sublime.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/monokai-sublime.min.css" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
#quill-container {
|
#quill-container {
|
||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
@@ -19,13 +19,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js" type="text/javascript"></script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js" type="text/javascript"></script>
|
||||||
<script src="https://cdn.quilljs.com/1.0.4/quill.js"></script>
|
<script src="https://cdn.quilljs.com/1.0.4/quill.js"></script>
|
||||||
<!-- quill does not include dist files! We are using the hosted version instead (see above)
|
<!-- quill does not include dist files! We are using the hosted version instead (see above)
|
||||||
<script src="../bower_components/quill/dist/quill.js"></script>
|
<script src="../bower_components/quill/dist/quill.js"></script>
|
||||||
-->
|
-->
|
||||||
<script src="../bower_components/yjs/y.js"></script>
|
<script src="../../y.js"></script>
|
||||||
|
<script src="../../../y-array/y-array.js"></script>
|
||||||
|
<script src="../../../y-richtext/dist/y-richtext.js"></script>
|
||||||
|
<script src="../../../y-memory/y-memory.js"></script>
|
||||||
|
<script src="../../../y-websockets-client/y-websockets-client.js"></script>
|
||||||
<script src="./index.js"></script>
|
<script src="./index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ Y({
|
|||||||
},
|
},
|
||||||
connector: {
|
connector: {
|
||||||
name: 'websockets-client',
|
name: 'websockets-client',
|
||||||
room: 'richtext-example-quill-1.0-test'
|
room: 'richtext-example-quill-1.0-test',
|
||||||
|
url: 'http://localhost:1234'
|
||||||
},
|
},
|
||||||
sourceDir: '/bower_components',
|
sourceDir: '/bower_components',
|
||||||
share: {
|
share: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-8",
|
"version": "13.0.0-12",
|
||||||
"description": "A framework for real-time p2p shared editing on any data",
|
"description": "A framework for real-time p2p shared editing on any data",
|
||||||
"main": "./y.node.js",
|
"main": "./y.node.js",
|
||||||
"browser": "./y.js",
|
"browser": "./y.js",
|
||||||
|
|||||||
133
src/Connector.js
133
src/Connector.js
@@ -43,10 +43,12 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
this.setUserId(Y.utils.generateUserId())
|
this.setUserId(Y.utils.generateUserId())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reconnect () {
|
reconnect () {
|
||||||
this.log('reconnecting..')
|
this.log('reconnecting..')
|
||||||
return this.y.db.startGarbageCollector()
|
return this.y.db.startGarbageCollector()
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect () {
|
disconnect () {
|
||||||
this.log('discronnecting..')
|
this.log('discronnecting..')
|
||||||
this.connections = new Map()
|
this.connections = new Map()
|
||||||
@@ -56,13 +58,16 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
this.y.db.stopGarbageCollector()
|
this.y.db.stopGarbageCollector()
|
||||||
return this.y.db.whenTransactionsFinished()
|
return this.y.db.whenTransactionsFinished()
|
||||||
}
|
}
|
||||||
|
|
||||||
repair () {
|
repair () {
|
||||||
this.log('Repairing the state of Yjs. This can happen if messages get lost, and Yjs detects that something is wrong. If this happens often, please report an issue here: https://github.com/y-js/yjs/issues')
|
this.log('Repairing the state of Yjs. This can happen if messages get lost, and Yjs detects that something is wrong. If this happens often, please report an issue here: https://github.com/y-js/yjs/issues')
|
||||||
this.connections.forEach(user => { user.isSynced = false })
|
|
||||||
this.isSynced = false
|
this.isSynced = false
|
||||||
this.currentSyncTarget = null
|
this.connections.forEach((user, userId) => {
|
||||||
this.findNextSyncTarget()
|
user.isSynced = false
|
||||||
|
this._syncWithUser(userId)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
setUserId (userId) {
|
setUserId (userId) {
|
||||||
if (this.userId == null) {
|
if (this.userId == null) {
|
||||||
if (!Number.isInteger(userId)) {
|
if (!Number.isInteger(userId)) {
|
||||||
@@ -77,20 +82,21 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onUserEvent (f) {
|
onUserEvent (f) {
|
||||||
this.userEventListeners.push(f)
|
this.userEventListeners.push(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
removeUserEventListener (f) {
|
removeUserEventListener (f) {
|
||||||
this.userEventListeners = this.userEventListeners.filter(g => f !== g)
|
this.userEventListeners = this.userEventListeners.filter(g => f !== g)
|
||||||
}
|
}
|
||||||
|
|
||||||
userLeft (user) {
|
userLeft (user) {
|
||||||
if (this.connections.has(user)) {
|
if (this.connections.has(user)) {
|
||||||
this.log('%s: User left %s', this.userId, user)
|
this.log('%s: User left %s', this.userId, user)
|
||||||
this.connections.delete(user)
|
this.connections.delete(user)
|
||||||
if (user === this.currentSyncTarget) {
|
// check if isSynced event can be sent now
|
||||||
this.currentSyncTarget = null
|
this._setSyncedWith(null)
|
||||||
this.findNextSyncTarget()
|
|
||||||
}
|
|
||||||
for (var f of this.userEventListeners) {
|
for (var f of this.userEventListeners) {
|
||||||
f({
|
f({
|
||||||
action: 'userLeft',
|
action: 'userLeft',
|
||||||
@@ -99,7 +105,7 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
userJoined (user, role) {
|
userJoined (user, role, auth) {
|
||||||
if (role == null) {
|
if (role == null) {
|
||||||
throw new Error('You must specify the role of the joined user!')
|
throw new Error('You must specify the role of the joined user!')
|
||||||
}
|
}
|
||||||
@@ -112,7 +118,7 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
isSynced: false,
|
isSynced: false,
|
||||||
role: role,
|
role: role,
|
||||||
processAfterAuth: [],
|
processAfterAuth: [],
|
||||||
auth: null,
|
auth: auth || null,
|
||||||
receivedSyncStep2: false
|
receivedSyncStep2: false
|
||||||
})
|
})
|
||||||
let defer = {}
|
let defer = {}
|
||||||
@@ -125,9 +131,7 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
role: role
|
role: role
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.currentSyncTarget == null) {
|
this._syncWithUser(user)
|
||||||
this.findNextSyncTarget()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Execute a function _when_ we are connected.
|
// Execute a function _when_ we are connected.
|
||||||
// If not connected, wait until connected
|
// If not connected, wait until connected
|
||||||
@@ -138,39 +142,25 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
this.whenSyncedListeners.push(f)
|
this.whenSyncedListeners.push(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
findNextSyncTarget () {
|
_syncWithUser (userid) {
|
||||||
if (this.currentSyncTarget != null || this.role === 'slave') {
|
if (this.role === 'slave') {
|
||||||
return // "The current sync has not finished or this is controlled by a master!"
|
return // "The current sync has not finished or this is controlled by a master!"
|
||||||
}
|
}
|
||||||
|
sendSyncStep1(this, userid)
|
||||||
var syncUser = null
|
}
|
||||||
for (var [uid, user] of this.connections) {
|
_fireIsSyncedListeners () {
|
||||||
if (!user.isSynced) {
|
this.y.db.whenTransactionsFinished().then(() => {
|
||||||
syncUser = uid
|
if (!this.isSynced) {
|
||||||
break
|
this.isSynced = true
|
||||||
|
// It is safer to remove this!
|
||||||
|
// TODO: remove: yield * this.garbageCollectAfterSync()
|
||||||
|
// call whensynced listeners
|
||||||
|
for (var f of this.whenSyncedListeners) {
|
||||||
|
f()
|
||||||
|
}
|
||||||
|
this.whenSyncedListeners = []
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
var conn = this
|
|
||||||
if (syncUser != null) {
|
|
||||||
this.currentSyncTarget = syncUser
|
|
||||||
sendSyncStep1(this, syncUser)
|
|
||||||
} else {
|
|
||||||
if (!conn.isSynced) {
|
|
||||||
this.y.db.requestTransaction(function * () {
|
|
||||||
if (!conn.isSynced) {
|
|
||||||
// it is crucial that isSynced is set at the time garbageCollectAfterSync is called
|
|
||||||
conn.isSynced = true
|
|
||||||
// It is safer to remove this!
|
|
||||||
// TODO: remove: yield * this.garbageCollectAfterSync()
|
|
||||||
// call whensynced listeners
|
|
||||||
for (var f of conn.whenSyncedListeners) {
|
|
||||||
f()
|
|
||||||
}
|
|
||||||
conn.whenSyncedListeners = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
send (uid, buffer) {
|
send (uid, buffer) {
|
||||||
if (!(buffer instanceof ArrayBuffer || buffer instanceof Uint8Array)) {
|
if (!(buffer instanceof ArrayBuffer || buffer instanceof Uint8Array)) {
|
||||||
@@ -220,12 +210,12 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
/*
|
/*
|
||||||
You received a raw message, and you know that it is intended for Yjs. Then call this function.
|
You received a raw message, and you know that it is intended for Yjs. Then call this function.
|
||||||
*/
|
*/
|
||||||
async receiveMessage (sender, buffer) {
|
receiveMessage (sender, buffer) {
|
||||||
if (!(buffer instanceof ArrayBuffer || buffer instanceof Uint8Array)) {
|
if (!(buffer instanceof ArrayBuffer || buffer instanceof Uint8Array)) {
|
||||||
throw new Error('Expected Message to be an ArrayBuffer or Uint8Array!')
|
return Promise.reject(new Error('Expected Message to be an ArrayBuffer or Uint8Array!'))
|
||||||
}
|
}
|
||||||
if (sender === this.userId) {
|
if (sender === this.userId) {
|
||||||
return
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
let decoder = new BinaryDecoder(buffer)
|
let decoder = new BinaryDecoder(buffer)
|
||||||
let encoder = new BinaryEncoder()
|
let encoder = new BinaryEncoder()
|
||||||
@@ -244,31 +234,33 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
if (messageType === 'sync step 1' || messageType === 'sync step 2') {
|
if (messageType === 'sync step 1' || messageType === 'sync step 2') {
|
||||||
let auth = decoder.readVarUint()
|
let auth = decoder.readVarUint()
|
||||||
if (senderConn.auth == null) {
|
if (senderConn.auth == null) {
|
||||||
|
senderConn.processAfterAuth.push([messageType, senderConn, decoder, encoder, sender])
|
||||||
// check auth
|
// check auth
|
||||||
let authPermissions = await this.checkAuth(auth, this.y, sender)
|
return this.checkAuth(auth, this.y, sender).then(authPermissions => {
|
||||||
senderConn.auth = authPermissions
|
if (senderConn.auth == null) {
|
||||||
this.y.emit('userAuthenticated', {
|
senderConn.auth = authPermissions
|
||||||
user: senderConn.uid,
|
this.y.emit('userAuthenticated', {
|
||||||
auth: authPermissions
|
user: senderConn.uid,
|
||||||
})
|
auth: authPermissions
|
||||||
senderConn.syncStep2.promise.then(() => {
|
})
|
||||||
if (senderConn.processAfterAuth == null) {
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
for (let i = 0; i < senderConn.processAfterAuth.length; i++) {
|
let messages = senderConn.processAfterAuth
|
||||||
let m = senderConn.processAfterAuth[i]
|
senderConn.processAfterAuth = []
|
||||||
this.receiveMessage(m[0], m[1])
|
|
||||||
}
|
return messages.reduce((p, m) =>
|
||||||
senderConn.processAfterAuth = null
|
p.then(() => this.computeMessage(m[0], m[1], m[2], m[3], m[4]))
|
||||||
|
, Promise.resolve())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (senderConn.auth != null) {
|
||||||
if (senderConn.auth == null) {
|
return this.computeMessage(messageType, senderConn, decoder, encoder, sender)
|
||||||
senderConn.processAfterAuth.push([sender, buffer])
|
} else {
|
||||||
return
|
senderConn.processAfterAuth.push([messageType, senderConn, decoder, encoder, sender])
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
computeMessage (messageType, senderConn, decoder, encoder, sender) {
|
||||||
if (messageType === 'sync step 1' && (senderConn.auth === 'write' || senderConn.auth === 'read')) {
|
if (messageType === 'sync step 1' && (senderConn.auth === 'write' || senderConn.auth === 'read')) {
|
||||||
// cannot wait for sync step 1 to finish, because we may wait for sync step 2 in sync step 1 (->lock)
|
// cannot wait for sync step 1 to finish, because we may wait for sync step 2 in sync step 1 (->lock)
|
||||||
computeMessageSyncStep1(decoder, encoder, this, senderConn, sender)
|
computeMessageSyncStep1(decoder, encoder, this, senderConn, sender)
|
||||||
@@ -278,19 +270,20 @@ export default function extendConnector (Y/* :any */) {
|
|||||||
} else if (messageType === 'update' && senderConn.auth === 'write') {
|
} else if (messageType === 'update' && senderConn.auth === 'write') {
|
||||||
return computeMessageUpdate(decoder, encoder, this, senderConn, sender)
|
return computeMessageUpdate(decoder, encoder, this, senderConn, sender)
|
||||||
} else {
|
} else {
|
||||||
console.error('Unable to receive message')
|
return Promise.reject(new Error('Unable to receive message'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_setSyncedWith (user) {
|
_setSyncedWith (user) {
|
||||||
var conn = this.connections.get(user)
|
if (user != null) {
|
||||||
if (conn != null) {
|
this.connections.get(user).isSynced = true
|
||||||
conn.isSynced = true
|
|
||||||
}
|
}
|
||||||
if (user === this.currentSyncTarget) {
|
let conns = Array.from(this.connections.values())
|
||||||
this.currentSyncTarget = null
|
if (conns.length > 0 && conns.every(u => u.isSynced)) {
|
||||||
this.findNextSyncTarget()
|
this._fireIsSyncedListeners()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Currently, the HB encodes operations as JSON. For the moment I want to keep it
|
Currently, the HB encodes operations as JSON. For the moment I want to keep it
|
||||||
that way. Maybe we support encoding in the HB as XML in the future, but for now I don't want
|
that way. Maybe we support encoding in the HB as XML in the future, but for now I don't want
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ export function formatYjsMessageType (buffer) {
|
|||||||
return decoder.readVarString()
|
return decoder.readVarString()
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function logMessageUpdate (decoder, strBuilder) {
|
export function logMessageUpdate (decoder, strBuilder) {
|
||||||
let len = decoder.readUint32()
|
let len = decoder.readUint32()
|
||||||
for (let i = 0; i < len; i++) {
|
for (let i = 0; i < len; i++) {
|
||||||
strBuilder.push(JSON.stringify(Y.Struct.binaryDecodeOperation(decoder)) + '\n')
|
strBuilder.push(JSON.stringify(Y.Struct.binaryDecodeOperation(decoder)) + '\n')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function computeMessageUpdate (decoder, encoder, conn) {
|
export function computeMessageUpdate (decoder, encoder, conn) {
|
||||||
if (conn.y.db.forwardAppliedOperations) {
|
if (conn.y.db.forwardAppliedOperations) {
|
||||||
let messagePosition = decoder.pos
|
let messagePosition = decoder.pos
|
||||||
let len = decoder.readUint32()
|
let len = decoder.readUint32()
|
||||||
@@ -78,7 +78,7 @@ export function logMessageSyncStep1 (decoder, strBuilder) {
|
|||||||
logSS(decoder, strBuilder)
|
logSS(decoder, strBuilder)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function computeMessageSyncStep1 (decoder, encoder, conn, senderConn, sender) {
|
export function computeMessageSyncStep1 (decoder, encoder, conn, senderConn, sender) {
|
||||||
let protocolVersion = decoder.readVarUint()
|
let protocolVersion = decoder.readVarUint()
|
||||||
let preferUntransformed = decoder.readUint8() === 1
|
let preferUntransformed = decoder.readUint8() === 1
|
||||||
|
|
||||||
@@ -92,27 +92,30 @@ export async function computeMessageSyncStep1 (decoder, encoder, conn, senderCon
|
|||||||
conn.y.destroy()
|
conn.y.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
// send sync step 2
|
return conn.y.db.whenTransactionsFinished().then(() => {
|
||||||
conn.y.db.requestTransaction(function * () {
|
// send sync step 2
|
||||||
encoder.writeVarString('sync step 2')
|
conn.y.db.requestTransaction(function * () {
|
||||||
encoder.writeVarString(conn.authInfo || '')
|
encoder.writeVarString('sync step 2')
|
||||||
|
encoder.writeVarString(conn.authInfo || '')
|
||||||
|
|
||||||
if (preferUntransformed) {
|
if (preferUntransformed) {
|
||||||
encoder.writeUint8(1)
|
encoder.writeUint8(1)
|
||||||
yield * this.writeOperationsUntransformed(encoder)
|
yield * this.writeOperationsUntransformed(encoder)
|
||||||
} else {
|
} else {
|
||||||
encoder.writeUint8(0)
|
encoder.writeUint8(0)
|
||||||
yield * this.writeOperations(encoder, decoder)
|
yield * this.writeOperations(encoder, decoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
yield * this.writeDeleteSet(encoder)
|
yield * this.writeDeleteSet(encoder)
|
||||||
conn.send(senderConn.uid, encoder.createBuffer())
|
conn.send(senderConn.uid, encoder.createBuffer())
|
||||||
senderConn.receivedSyncStep2 = true
|
senderConn.receivedSyncStep2 = true
|
||||||
|
})
|
||||||
|
return conn.y.db.whenTransactionsFinished().then(() => {
|
||||||
|
if (conn.role === 'slave') {
|
||||||
|
sendSyncStep1(conn, sender)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
if (conn.role === 'slave') {
|
|
||||||
sendSyncStep1(conn, sender)
|
|
||||||
}
|
|
||||||
await conn.y.db.whenTransactionsFinished()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function logSS (decoder, strBuilder) {
|
export function logSS (decoder, strBuilder) {
|
||||||
@@ -161,7 +164,7 @@ export function logMessageSyncStep2 (decoder, strBuilder) {
|
|||||||
logDS(decoder, strBuilder)
|
logDS(decoder, strBuilder)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function computeMessageSyncStep2 (decoder, encoder, conn, senderConn, sender) {
|
export function computeMessageSyncStep2 (decoder, encoder, conn, senderConn, sender) {
|
||||||
var db = conn.y.db
|
var db = conn.y.db
|
||||||
let defer = senderConn.syncStep2
|
let defer = senderConn.syncStep2
|
||||||
|
|
||||||
@@ -178,7 +181,8 @@ export async function computeMessageSyncStep2 (decoder, encoder, conn, senderCon
|
|||||||
db.requestTransaction(function * () {
|
db.requestTransaction(function * () {
|
||||||
yield * this.applyDeleteSet(decoder)
|
yield * this.applyDeleteSet(decoder)
|
||||||
})
|
})
|
||||||
await db.whenTransactionsFinished()
|
return db.whenTransactionsFinished().then(() => {
|
||||||
conn._setSyncedWith(sender)
|
conn._setSyncedWith(sender)
|
||||||
defer.resolve()
|
defer.resolve()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ export async function initArrays (t, opts) {
|
|||||||
let connOpts
|
let connOpts
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
// Only one instance can gc!
|
// Only one instance can gc!
|
||||||
dbOpts = Object.assign({ gc: true }, opts.db)
|
dbOpts = Object.assign({ gc: false }, opts.db)
|
||||||
connOpts = Object.assign({ role: 'master' }, connector)
|
connOpts = Object.assign({ role: 'master' }, connector)
|
||||||
} else {
|
} else {
|
||||||
dbOpts = Object.assign({ gc: false }, opts.db)
|
dbOpts = Object.assign({ gc: false }, opts.db)
|
||||||
|
|||||||
1
y.node.js.map
Normal file
1
y.node.js.map
Normal file
File diff suppressed because one or more lines are too long
1
y.test.js.map
Normal file
1
y.test.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user