theprogrammablemind 8.0.0-beta.46 → 8.0.0-beta.48

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
@@ -895,14 +895,15 @@ const rebuildTemplate = async ({ config, target, previousResultss, startOfChange
895
895
  }
896
896
  const { property, hierarchy, query: queryOrExtraConfig, previousResults, initializer, skipSemantics } = configs.shift()
897
897
  // queries are strings or { query: "blah", development: true/false }
898
- if (typeof queryOrExtraConfig === 'string' || queryOrExtraConfig.query) {
898
+ if (typeof queryOrExtraConfig === 'string' || queryOrExtraConfig.query || queryOrExtraConfig.isFragment) {
899
899
  let query = queryOrExtraConfig
900
+ let isFragment = queryOrExtraConfig.isFragment
900
901
  if (typeof queryOrExtraConfig === 'string') {
901
902
  query = { query }
902
903
  }
903
- config.config.skipSemantics = skipSemantics
904
+ config.config.skipSemantics = skipSemantics && !isFragment
904
905
  const transitoryMode = global.transitoryMode
905
- if (property == 'fragments') {
906
+ if (isFragment || property == 'fragments') {
906
907
  global.transitoryMode = true
907
908
  }
908
909
  if (hierarchy) {
@@ -939,6 +940,7 @@ const rebuildTemplate = async ({ config, target, previousResultss, startOfChange
939
940
  global.transitoryMode = transitoryMode
940
941
  config.config.skipSemantics = null
941
942
  results.query = query.query
943
+ results.isFragment = isFragment
942
944
  results.skipSemantics = skipSemantics
943
945
  results.development = query.development
944
946
  results.key = { query: query.query, hierarchy }
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.46",
68
+ "version": "8.0.0-beta.48",
69
69
  "license": "UNLICENSED"
70
70
  }
package/src/config.js CHANGED
@@ -255,6 +255,9 @@ const priority_valid = (cp) => {
255
255
  const handleBridgeProps = (config, bridge, { addFirst, uuid } = {}) => {
256
256
  ecatch(`While processing the bridge for ${bridge.id}#${bridge.level}`,
257
257
  () => {
258
+ if (bridge.development && config.isModule) {
259
+ return
260
+ }
258
261
  if (!bridge.bridge) {
259
262
  bridge.bridge = '{ ...next(operator) }'
260
263
  }
@@ -1047,6 +1050,11 @@ class Config {
1047
1050
  return this.fragmentInstantiator(fragment.contexts)
1048
1051
  }
1049
1052
  }
1053
+ for (const fragment of (instance.resultss || [])) {
1054
+ if (fragment.isFragment && fragment.query === query) {
1055
+ return this.fragmentInstantiator(fragment.contexts)
1056
+ }
1057
+ }
1050
1058
  }
1051
1059
  }
1052
1060
 
@@ -381,7 +381,6 @@ const loadInstance = async (config, instance) => {
381
381
  }
382
382
 
383
383
  const { /* data, generators, semantics, */ hierarchy } = setupProcessB({ config })
384
- // for (const results of (instance.resultss || [])) {
385
384
  for (const i in (instance.resultss || [])) {
386
385
  const results = instance.resultss[i]
387
386
  if (results.extraConfig) {
@@ -400,6 +399,7 @@ const loadInstance = async (config, instance) => {
400
399
  const uuid = config.nameToUUID(instance.name)
401
400
  setupArgs(args, config, config.logs, hierarchy, uuid)
402
401
  await results.apply(args)
402
+ } else if (results.isFragment) {
403
403
  } else {
404
404
  if (results.skipSemantics) {
405
405
  config.config.skipSemantics = results.skipSemantics