Deploy 0.8.20
This commit is contained in:
parent
74ed9e4107
commit
6599cb20b4
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<textarea style="width:80%;" rows=40 id="textfield" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
|
<textarea style="width:80%;" rows=40 id="textfield" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
|
||||||
<script src="../bower_components/yjs/y.js"></script>
|
<script src="../bower_components/yjs/y.es6"></script>
|
||||||
<script src="./index.js"></script>
|
<script src="./index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "0.8.19",
|
"version": "0.8.21",
|
||||||
"homepage": "y-js.org",
|
"homepage": "y-js.org",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||||
|
32
y.es6
32
y.es6
@ -718,9 +718,17 @@ module.exports = function (Y /* :any */) {
|
|||||||
this.gc2 = this.gc2.filter(filter)
|
this.gc2 = this.gc2.filter(filter)
|
||||||
delete op.gc
|
delete op.gc
|
||||||
}
|
}
|
||||||
destroy () {
|
* destroy () {
|
||||||
clearInterval(this.gcInterval)
|
clearInterval(this.gcInterval)
|
||||||
this.gcInterval = null
|
this.gcInterval = null
|
||||||
|
for (var key in this.initializedTypes) {
|
||||||
|
var type = this.initializedTypes[key]
|
||||||
|
if (type._destroy != null) {
|
||||||
|
type._destroy()
|
||||||
|
} else {
|
||||||
|
console.error('The type you included does not provide destroy functionality, it will remain in memory (updating your packages will help).')
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setUserId (userId) {
|
setUserId (userId) {
|
||||||
if (!this.userIdPromise.inProgress) {
|
if (!this.userIdPromise.inProgress) {
|
||||||
@ -2252,6 +2260,12 @@ module.exports = function (Y /* : any*/) {
|
|||||||
this.onevent = onevent
|
this.onevent = onevent
|
||||||
this.eventListeners = []
|
this.eventListeners = []
|
||||||
}
|
}
|
||||||
|
destroy () {
|
||||||
|
this.waiting = null
|
||||||
|
this.awaiting = null
|
||||||
|
this.onevent = null
|
||||||
|
this.eventListeners = null
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
Call this when a new operation arrives. It will be executed right away if
|
Call this when a new operation arrives. It will be executed right away if
|
||||||
there are no waiting operations, that you prematurely executed
|
there are no waiting operations, that you prematurely executed
|
||||||
@ -2697,6 +2711,7 @@ class YConfig {
|
|||||||
db: Y.AbstractDatabase;
|
db: Y.AbstractDatabase;
|
||||||
connector: Y.AbstractConnector;
|
connector: Y.AbstractConnector;
|
||||||
share: {[key: string]: any};
|
share: {[key: string]: any};
|
||||||
|
options: Object;
|
||||||
*/
|
*/
|
||||||
constructor (opts, callback) {
|
constructor (opts, callback) {
|
||||||
this.options = opts
|
this.options = opts
|
||||||
@ -2734,10 +2749,17 @@ class YConfig {
|
|||||||
return this.connector.reconnect()
|
return this.connector.reconnect()
|
||||||
}
|
}
|
||||||
destroy () {
|
destroy () {
|
||||||
this.disconnect()
|
if (this.connector.destroy != null) {
|
||||||
this.db.destroy()
|
this.connector.destroy()
|
||||||
this.connector = null
|
} else {
|
||||||
this.db = null
|
this.connector.disconnect()
|
||||||
|
}
|
||||||
|
var self = this
|
||||||
|
this.db.requestTransaction(function * () {
|
||||||
|
yield* self.db.destroy()
|
||||||
|
self.connector = null
|
||||||
|
self.db = null
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user