theprogrammablemind 8.0.0-beta.83 → 8.0.0-beta.84

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.
package/client.js CHANGED
@@ -951,7 +951,7 @@ const rebuildTemplate = async ({ config, target, previousResultss, startOfChange
951
951
  if (results.contexts.length > 1) {
952
952
  console.log(`query "${query.query}". There is ${results.contexts.length} contexts in the results. Make sure its producing the results that you expect.`)
953
953
  throw new Error(`query "${query.query}". There is ${results.contexts.length} contexts in the results. Make sure its producing the results that you expect.`)
954
- } else if (results.paraphrases[0] != query.query) {
954
+ } else if (results.paraphrases[0].toLowerCase() !== query.query.toLowerCase()) {
955
955
  console.log(`query "${query.query}". The paraphrase is different from the query "${results.paraphrases[0]}".${prMessage}`)
956
956
  } else {
957
957
  console.log(`query ${isFragment ? 'fragment' : ''}"${query.query}".${prMessage}`)
@@ -981,7 +981,7 @@ const rebuildTemplate = async ({ config, target, previousResultss, startOfChange
981
981
  const objects = config.get('objects')
982
982
  const args = { objects, getObjects: getObjects(objects) }
983
983
  setupArgs(args, config, config.logs, config.hierarchy)
984
- initFunction(args)
984
+ await initFunction(args)
985
985
  accumulators[property].push({ apply: queryOrExtraConfig })
986
986
  await looper(configs)
987
987
  } else {
package/package.json CHANGED
@@ -65,6 +65,6 @@
65
65
  "sort-json": "^2.0.0",
66
66
  "uuid": "^8.3.2"
67
67
  },
68
- "version": "8.0.0-beta.83",
68
+ "version": "8.0.0-beta.84",
69
69
  "license": "UNLICENSED"
70
70
  }
package/src/config.js CHANGED
@@ -1278,7 +1278,7 @@ class Config {
1278
1278
  // TODO fix beforeQuery
1279
1279
  template = { fragments: [], configs: [], ...template }
1280
1280
  template.fragments = template.fragments.concat(this.dynamicFragments)
1281
- rebuildTemplate({ config: this, target: this.name, previousResultss: options.previousResultss, startOfChanges: options.startOfChanges, beforeQuery: () => {}, template, ...options })
1281
+ await rebuildTemplate({ config: this, target: this.name, previousResultss: options.previousResultss, startOfChanges: options.startOfChanges, beforeQuery: () => {}, template, ...options })
1282
1282
  } else {
1283
1283
  // no change
1284
1284
  // this.initInstances.push({ ...instance, name: config.name })
package/src/helpers.js CHANGED
@@ -23,7 +23,7 @@ function where (goUp = 2) {
23
23
  if (match) {
24
24
  return `${match[1]}:${match[2]}`
25
25
  } else {
26
- return 'running in browser'
26
+ return 'running in browser or in an async call so the stack is broken.'
27
27
  }
28
28
  }
29
29