@knowlearning/agents 0.9.33 → 0.9.35

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.
@@ -211,7 +211,7 @@ export default function EmbeddedAgent() {
211
211
  return send({ type: 'login', provider, username, password })
212
212
  }
213
213
 
214
- function query(query, params) { return send({ type: 'query', query, params }) }
214
+ function query(query, params, domain) { return send({ type: 'query', query, params, domain }) }
215
215
  function logout() { return send({ type: 'logout' }) }
216
216
  function disconnect() { return send({ type: 'disconnect' }) }
217
217
  function reconnect() { return send({ type: 'reconnect' }) }
@@ -97,8 +97,8 @@ function embed(environment, iframe) {
97
97
  sendDown(await Agent.patch(root, scopes))
98
98
  }
99
99
  else if (type === 'query') {
100
- const { query, params } = message
101
- sendDown(await Agent.query(query, params))
100
+ const { query, params, domain } = message
101
+ sendDown(await Agent.query(query, params, domain))
102
102
  }
103
103
  else if (type === 'upload') {
104
104
  const { name, contentType, id } = message
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.33",
3
+ "version": "0.9.35",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",
@@ -1,8 +1,6 @@
1
1
  import { watchEffect, defineAsyncComponent } from 'vue'
2
2
  import { browserAgent } from '../../../browser.js'
3
3
 
4
- const Agent = browserAgent()
5
-
6
4
  // TODO: probably want to make this a util, and better fleshed out (with white instead of blacklist)
7
5
  function isScopeSerializable(v) {
8
6
  return !(
@@ -11,6 +9,7 @@ function isScopeSerializable(v) {
11
9
  }
12
10
 
13
11
  export default function (module, scope) {
12
+ const Agent = browserAgent()
14
13
  return defineAsyncComponent(async function () {
15
14
  const component = module.default ? { ...module.default } : { ...module } // copy component since we will mess with mounted and data functions
16
15