theprogrammablemind 7.10.0-beta.10 → 7.10.0-beta.11
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 +18 -7
- package/package.json +1 -1
- package/src/config.js +9 -5
package/client.js
CHANGED
@@ -1466,7 +1466,18 @@ const knowledgeModuleImpl = async ({
|
|
1466
1466
|
...rest
|
1467
1467
|
} = {}) => {
|
1468
1468
|
|
1469
|
-
|
1469
|
+
/*
|
1470
|
+
if (description == 'fastfood related concepts') {
|
1471
|
+
debugger
|
1472
|
+
global.old = template.template.queries[91].bridges[0]
|
1473
|
+
}
|
1474
|
+
let old
|
1475
|
+
if (template && template.template && template.template.queries) {
|
1476
|
+
old = template.template.queries
|
1477
|
+
template.template.queries = _.cloneDeep(template.template.queries)
|
1478
|
+
template.wasCopied = true
|
1479
|
+
}
|
1480
|
+
*/
|
1470
1481
|
|
1471
1482
|
const unknownArgs = Object.keys(rest)
|
1472
1483
|
if (unknownArgs.length > 0) {
|
@@ -1770,7 +1781,6 @@ const knowledgeModuleImpl = async ({
|
|
1770
1781
|
|
1771
1782
|
if (template) {
|
1772
1783
|
let needsRebuild
|
1773
|
-
console.log('template.template needs rebuild', template.template)
|
1774
1784
|
if (args.rebuildTemplate && !args.rebuildTemplateFull) {
|
1775
1785
|
// get the startOfChanges for the partial rebuild
|
1776
1786
|
needsRebuild = config.needsRebuild(template.template, template.instance, { ...options, rebuild: false })
|
@@ -2018,6 +2028,12 @@ const knowledgeModuleImpl = async ({
|
|
2018
2028
|
printConfig()
|
2019
2029
|
} else {
|
2020
2030
|
const initConfig = (config) => {
|
2031
|
+
if (template) {
|
2032
|
+
if (config.needsRebuild(template.template, template.instance, { isModule: !isProcess }).needsRebuild) {
|
2033
|
+
const error = `This module "${config.name}" cannot be used because the instance file needs rebuilding. Run on the command line with no arguments or the -rt argument to rebuild.`
|
2034
|
+
throw new Error(error)
|
2035
|
+
}
|
2036
|
+
}
|
2021
2037
|
setupConfig(config)
|
2022
2038
|
|
2023
2039
|
let loadForTesting = false
|
@@ -2045,11 +2061,6 @@ const knowledgeModuleImpl = async ({
|
|
2045
2061
|
}
|
2046
2062
|
|
2047
2063
|
if (template) {
|
2048
|
-
console.log('template.template needs rebuild', template.template)
|
2049
|
-
if (config.needsRebuild(template.template, template.instance, { isModule: !isProcess }).needsRebuild) {
|
2050
|
-
const error = `This module "${config.name}" cannot be used because the instance file needs rebuilding. Run on the command line with no arguments or the -rt argument to rebuild.`
|
2051
|
-
throw new Error(error)
|
2052
|
-
}
|
2053
2064
|
try {
|
2054
2065
|
config.load(template.template, template.instance)
|
2055
2066
|
} catch( e ) {
|
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -347,11 +347,15 @@ const handleBridgeProps = (config, bridge, addFirst) => {
|
|
347
347
|
}
|
348
348
|
|
349
349
|
const handleCalculatedProps = (baseConfig, moreConfig, addFirst) => {
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
350
|
+
if (moreConfig.bridges) {
|
351
|
+
moreConfig.bridges = moreConfig.bridges.map((bridge) => {
|
352
|
+
bridge = {...bridge}
|
353
|
+
const valid = [ 'after', 'before', 'bridge', 'development', 'evaluator', 'generatorp', 'generatorr', 'generatorpr', 'generators', 'id', 'convolution', 'inverted', 'isA', 'children', 'parents',
|
354
|
+
'level', 'optional', 'selector', 'semantic', 'words', /Bridge$/, 'localHierarchy', 'levelSpecificHierarchy', 'where', 'uuid' ]
|
355
|
+
helpers.validProps(valid, bridge, 'bridge')
|
356
|
+
handleBridgeProps(baseConfig, bridge, addFirst)
|
357
|
+
return bridge
|
358
|
+
})
|
355
359
|
}
|
356
360
|
if (moreConfig.operators) {
|
357
361
|
moreConfig.operators = moreConfig.operators.map((operator) => {
|