theprogrammablemind_4wp 9.3.0-beta.37 → 9.3.0-beta.38

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/package.json CHANGED
@@ -69,6 +69,6 @@
69
69
  "sort-json": "^2.0.0",
70
70
  "uuid": "^8.3.2"
71
71
  },
72
- "version": "9.3.0-beta.37",
72
+ "version": "9.3.0-beta.38",
73
73
  "license": "UNLICENSED"
74
74
  }
package/src/config.js CHANGED
@@ -3185,6 +3185,12 @@ class Config {
3185
3185
  more.generators.map( (g) => g.km = km )
3186
3186
  }
3187
3187
  }
3188
+ const normalizeIsA = (edge) => {
3189
+ if (edge.length == 3 || edge.parent || edge.child) {
3190
+ return edge
3191
+ }
3192
+ return [...edge, false]
3193
+ }
3188
3194
  for (const key of Object.keys(more)) {
3189
3195
  const value = more[key]
3190
3196
  // TODO remove name and description on the config bag
@@ -3228,9 +3234,9 @@ class Config {
3228
3234
  const hierarchy = this.config.words.hierarchy
3229
3235
  const moreHierarchy = more.words.hierarchy
3230
3236
  if (addFirst) {
3231
- this.config.words.hierarchy = moreHierarchy.concat(hierarchy)
3237
+ this.config.words.hierarchy = moreHierarchy.concat(hierarchy.map(normalizeIsA))
3232
3238
  } else {
3233
- this.config.words.hierarchy = hierarchy.concat(moreHierarchy)
3239
+ this.config.words.hierarchy = hierarchy.concat(moreHierarchy.map(normalizeIsA))
3234
3240
  }
3235
3241
  }
3236
3242
  } else if (key === 'name') {
@@ -3302,7 +3308,7 @@ class Config {
3302
3308
  // console.log('more', JSON.stringify(more, null, 2))
3303
3309
  // hierarchy must update in place and does not care about the list order
3304
3310
  if (key === 'hierarchy') {
3305
- this.config[key].push(...more[key])
3311
+ this.config[key].push(...more[key].map(normalizeIsA))
3306
3312
  } else {
3307
3313
  if (addFirst) {
3308
3314
  this.config[key] = more[key].concat(this.config[key])
package/src/debug.js CHANGED
@@ -31,12 +31,12 @@ const wasHit = (name) => {
31
31
  return hits[name]
32
32
  }
33
33
 
34
- const counter = (name, breakAt = [], debugBreak = true) => {
34
+ const counter = (name, { breakAt=[], debugBreak=true, tag='' } = {}) => {
35
35
  if (!counters[name]) {
36
36
  counters[name] = 0
37
37
  }
38
38
  counters[name] += 1
39
- console.log(`counters[${name}] = ${counters[name]}`)
39
+ console.log(`counters[${name}] = ${counters[name]} ${tag}`)
40
40
  unhit(name)
41
41
  if (Array.isArray(breakAt) && breakAt.includes(counters[name])) {
42
42
  if (debugBreak) {