@knowlearning/agents 0.9.184 → 0.9.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,8 @@ export default options => {
50
50
  })
51
51
 
52
52
  this.send = message => {
53
+ // TODO: more sophisticated enable/disable of debug messaging
54
+ debugLog('SEND', message)
53
55
  try {
54
56
  socket.emit('message', message)
55
57
  } catch (err) {
@@ -67,6 +69,7 @@ export default options => {
67
69
  })
68
70
 
69
71
  socket.on('message', (data) => {
72
+ debugLog('RECV', data)
70
73
  if (this.onmessage) this.onmessage(data)
71
74
  })
72
75
 
@@ -110,3 +113,7 @@ export default options => {
110
113
 
111
114
  return agent
112
115
  }
116
+
117
+ function debugLog() {
118
+ if (localStorage.getItem('__default_knowlearning_agent.debug')) console.log(...arguments)
119
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.184",
3
+ "version": "0.9.186",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "homepage": "https://github.com/knowlearning/platform#readme",
26
26
  "dependencies": {
27
- "@knowlearning/patch-proxy": "^1.3.4",
27
+ "@knowlearning/patch-proxy": "^1.3.5",
28
28
  "fast-json-patch": "^3.1.1",
29
29
  "socket.io-client": "^4.8.1",
30
30
  "uuid": "^8.3.2"