theprogrammablemind 9.3.0-beta.20 → 9.3.0-beta.22

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.20",
72
+ "version": "9.3.0-beta.22",
73
73
  "license": "UNLICENSED"
74
74
  }
package/src/config.js CHANGED
@@ -3153,7 +3153,7 @@ class Config {
3153
3153
  }
3154
3154
 
3155
3155
  // TODO get rid of useOldVersion arg
3156
- addInternal (more, { uuid, addFirst = false, useOldVersion = true, skipObjects = false, includeNamespaces = true, allowNameToBeNull = false, handleCalculatedProps: hcps = false } = {}) {
3156
+ addInternal (more, { uuid, km, addFirst = false, useOldVersion = true, skipObjects = false, includeNamespaces = true, allowNameToBeNull = false, handleCalculatedProps: hcps = false } = {}) {
3157
3157
  validConfigProps(more)
3158
3158
  if (more instanceof Config) {
3159
3159
  more.initialize({ force: false })
@@ -3170,6 +3170,14 @@ class Config {
3170
3170
  handleCalculatedProps(this, more, { addFirst, uuid })
3171
3171
  applyUUID(more, uuid || this._uuid)
3172
3172
  }
3173
+ if (km) {
3174
+ if (more.semantics) {
3175
+ more.semantics.map( (s) => s.km = km )
3176
+ }
3177
+ if (more.generators) {
3178
+ more.generators.map( (g) => g.km = km )
3179
+ }
3180
+ }
3173
3181
  for (const key of Object.keys(more)) {
3174
3182
  const value = more[key]
3175
3183
  // TODO remove name and description on the config bag
@@ -448,7 +448,7 @@ const loadInstance = async (config, instance) => {
448
448
  // config.addInternal(results, useOldVersion = true, skipObjects = false, includeNamespaces = true, allowNameToBeNull = false)
449
449
  const uuid = config.nameToUUID(instance.name)
450
450
  // used to do a CLONE
451
- config.addInternal(instance.template.configs[i], { uuid, addFirst: true, handleCalculatedProps: true })
451
+ config.addInternal(instance.template.configs[i], { uuid, km: instance.name, addFirst: true, handleCalculatedProps: true })
452
452
  } else if (results.apply) {
453
453
  const objects = getObjects(config.get('objects'))(config.uuid)
454
454
  const args = { objects, getObjects: getObjects(objects) }