permission protocol + reduce circular dependencies

This commit is contained in:
Kevin Jahns
2018-12-11 19:49:21 +01:00
parent e09ef15349
commit 04066a5678
29 changed files with 380 additions and 213 deletions

View File

@@ -5,7 +5,7 @@
import { Type } from '../structs/Type.js'
import { ItemJSON } from '../structs/ItemJSON.js'
import { ItemString } from '../structs/ItemString.js'
import { stringifyItemID, logItemHelper } from '../protocols/syncProtocol.js'
import * as stringify from '../utils/structStringify.js'
import { YEvent } from '../utils/YEvent.js'
import { Transaction } from '../utils/Transaction.js' // eslint-disable-line
import { Item } from '../structs/Item.js' // eslint-disable-line
@@ -368,6 +368,6 @@ export class YArray extends Type {
* @private
*/
_logString () {
return logItemHelper('YArray', this, `start:${stringifyItemID(this._start)}"`)
return stringify.logItemHelper('YArray', this, `start:${stringify.stringifyItemID(this._start)}"`)
}
}

View File

@@ -5,7 +5,7 @@
import { Item } from '../structs/Item.js'
import { Type } from '../structs/Type.js'
import { ItemJSON } from '../structs/ItemJSON.js'
import { logItemHelper } from '../protocols/syncProtocol.js'
import * as stringify from '../utils/structStringify.js'
import { YEvent } from '../utils/YEvent.js'
/**
@@ -175,6 +175,6 @@ export class YMap extends Type {
* @private
*/
_logString () {
return logItemHelper('YMap', this, `mapSize:${this._map.size}`)
return stringify.logItemHelper('YMap', this, `mapSize:${this._map.size}`)
}
}

View File

@@ -5,7 +5,7 @@
import { ItemEmbed } from '../structs/ItemEmbed.js'
import { ItemString } from '../structs/ItemString.js'
import { ItemFormat } from '../structs/ItemFormat.js'
import { logItemHelper } from '../protocols/syncProtocol.js'
import * as stringify from '../utils/structStringify.js'
import { YArrayEvent, YArray } from './YArray.js'
/**
@@ -702,6 +702,6 @@ export class YText extends YArray {
* @private
*/
_logString () {
return logItemHelper('YText', this)
return stringify.logItemHelper('YText', this)
}
}

View File

@@ -11,7 +11,7 @@ import { DomBinding } from '../bindings/dom/DomBinding.js' // eslint-disable-lin
import { YXmlTreeWalker } from './YXmlTreeWalker.js'
import { YArray } from './YArray.js'
import { YXmlEvent } from './YXmlEvent.js'
import { logItemHelper } from '../protocols/syncProtocol.js'
import * as stringify from '../utils/structStringify.js'
/**
* Dom filter function.
@@ -164,7 +164,7 @@ export class YXmlFragment extends YArray {
* @private
*/
_logString () {
return logItemHelper('YXml', this)
return stringify.logItemHelper('YXml', this)
}
}