theprogrammablemind 7.12.2-beta.4 → 7.12.2-beta.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +19 -14
package/package.json CHANGED
@@ -65,6 +65,6 @@
65
65
  "json-stable-stringify": "^1.0.1",
66
66
  "node-fetch": "^2.6.1"
67
67
  },
68
- "version": "7.12.2-beta.4",
68
+ "version": "7.12.2-beta.5",
69
69
  "license": "UNLICENSED"
70
70
  }
package/src/config.js CHANGED
@@ -259,14 +259,16 @@ const handleBridgeProps = (config, bridge, addFirst) => {
259
259
  }
260
260
  }
261
261
  */
262
+
263
+ const addUUID = (obj) => { return { ...obj, uuid: config.uuid } }
262
264
  if (bridge.generators) {
263
265
  const generators = [...bridge.generators]
264
266
  generators.reverse()
265
267
  for (const generator of generators) {
266
268
  if (addFirst) {
267
- config.config.generators.unshift(generator)
269
+ config.config.generators.unshift(addUUID(generator))
268
270
  } else {
269
- config.config.generators.push(generator)
271
+ config.config.generators.push(addUUID(generator))
270
272
  }
271
273
  }
272
274
  }
@@ -287,9 +289,9 @@ const handleBridgeProps = (config, bridge, addFirst) => {
287
289
  property: 'generatorp'
288
290
  }
289
291
  if (addFirst) {
290
- config.config.generators.unshift(generator)
292
+ config.config.generators.unshift(addUUID(generator))
291
293
  } else {
292
- config.config.generators.push(generator)
294
+ config.config.generators.push(addUUID(generator))
293
295
  }
294
296
  }
295
297
  if (bridge.generatorr) {
@@ -304,9 +306,9 @@ const handleBridgeProps = (config, bridge, addFirst) => {
304
306
  property: 'generatorr'
305
307
  }
306
308
  if (addFirst) {
307
- config.config.generators.unshift(generator)
309
+ config.config.generators.unshift(addUUID(generator))
308
310
  } else {
309
- config.config.generators.push(generator)
311
+ config.config.generators.push(addUUID(generator))
310
312
  }
311
313
  }
312
314
  if (bridge.evaluator) {
@@ -318,9 +320,9 @@ const handleBridgeProps = (config, bridge, addFirst) => {
318
320
  property: 'evaluator'
319
321
  }
320
322
  if (addFirst) {
321
- config.config.semantics.unshift(semantic)
323
+ config.config.semantics.unshift(addUUID(semantic))
322
324
  } else {
323
- config.config.semantics.push(semantic)
325
+ config.config.semantics.push(addUUID(semantic))
324
326
  }
325
327
  }
326
328
  if (bridge.semantic) {
@@ -332,9 +334,9 @@ const handleBridgeProps = (config, bridge, addFirst) => {
332
334
  property: 'semantic'
333
335
  }
334
336
  if (addFirst) {
335
- config.config.semantics.unshift(semantic)
337
+ config.config.semantics.unshift(addUUID(semantic))
336
338
  } else {
337
- config.config.semantics.push(semantic)
339
+ config.config.semantics.push(addUUID(semantic))
338
340
  }
339
341
  }
340
342
  }
@@ -511,6 +513,12 @@ function applyUUID (config, uuid) {
511
513
  if (config.bridges) {
512
514
  config.bridges = config.bridges.map((o) => Object.assign(o, { uuid }))
513
515
  }
516
+ if (config.generators) {
517
+ config.generators = config.generators.map((o) => Object.assign(o, { uuid }))
518
+ }
519
+ if (config.semantics) {
520
+ config.semantics = config.semantics.map((o) => Object.assign(o, { uuid }))
521
+ }
514
522
  if (config.words) {
515
523
  setWordsUUIDs(config.words, uuid)
516
524
  }
@@ -1097,6 +1105,7 @@ class Config {
1097
1105
  if (!helpers.safeEquals(templateQueries[iq], instanceQueries[iq])) {
1098
1106
  sameQueries = false
1099
1107
  startOfChanges = iq
1108
+ break;
1100
1109
  }
1101
1110
  }
1102
1111
 
@@ -1114,10 +1123,6 @@ class Config {
1114
1123
 
1115
1124
  if (debug) {
1116
1125
  if (!(instance && sameQueries && sameFragments)) {
1117
- if (!sameQueries) {
1118
- debugger
1119
- debugger
1120
- }
1121
1126
  // console.log("instance", instance)
1122
1127
  console.log('sameQueries', sameQueries)
1123
1128
  console.log('sameFragments', sameFragments)