theprogrammablemind 8.5.0 → 8.6.0-beta.1

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
@@ -1223,6 +1223,7 @@ const knowledgeModuleImpl = async ({
1223
1223
  parser.add_argument('-od', '--objectDiff', { action: 'store_true', help: 'When showing the objects use a colour diff' })
1224
1224
  parser.add_argument('-p', '--print', { help: 'Print the specified elements c === config, w === words, b === bridges, o === operators d === objects (d for data), h === hierarchy, g === generators, s === semantics, l === load t=tests ordering p === priorities a == associations j == JSON sent to server. for example --print wb' })
1225
1225
  parser.add_argument('-s', '--save', { action: 'store_true', help: 'When running with the --query flag this will save the current run to the test file. When running without the --query flag all tests will be run and resaved.' })
1226
+ parser.add_argument('-fr', '--failRebuild', { action: 'store_true', help: 'If a rebuild is required fail out.' })
1226
1227
  parser.add_argument('-sd', '--saveDeveloper', { action: 'store_true', help: 'Same as -s but the query will not show up in the info command.' })
1227
1228
  parser.add_argument('-dl', '--debugLoops', { action: 'store_true', help: 'When running with the --debugLoops flag the logs calls to semantics and generators will be immediately written to the console ' })
1228
1229
  parser.add_argument('-d', '--debug', { action: 'store_true', help: 'When running with the --debug flag this set the debug flag in the config' })
@@ -1477,6 +1478,10 @@ const knowledgeModuleImpl = async ({
1477
1478
  if (needsRebuild.previousResultss) {
1478
1479
  console.log('Rebuild using the optimization to use previous results until a change is hit. For a full rebuild use -rtf')
1479
1480
  }
1481
+ if (args.failRebuild) {
1482
+ console.log('Needs rebuild and fail rebuild as specified so failing out')
1483
+ runtime.process.exit(-1)
1484
+ }
1480
1485
  console.log(`This module "${config.name}" needs rebuilding all other arguments will be ignored. Try again after the template is rebuilt.`)
1481
1486
  options.rebuild = true
1482
1487
  config.config.rebuild = true
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.5.0",
68
+ "version": "8.6.0-beta.1",
69
69
  "license": "UNLICENSED"
70
70
  }
package/src/helpers.js CHANGED
@@ -314,7 +314,8 @@ const functionsToStrings = (config) => {
314
314
  config = { ...config }
315
315
  defToStrings = (def) => {
316
316
  if (def.apply) {
317
- return { ...def, match: def.match.toString(), apply: def.apply.toString() }
317
+ // return { ...def, match: def.match.toString(), apply: def.apply.toString() }
318
+ return { match: def.match.toString(), apply: def.apply.toString() }
318
319
  } else {
319
320
  return [def[0].toString(), def[1].toString()]
320
321
  }