theprogrammablemind 7.4.2 → 7.4.3-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/package.json +1 -1
- package/src/config.js +10 -1
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -1063,6 +1063,15 @@ class Config {
|
|
1063
1063
|
// this.config.words = {}
|
1064
1064
|
}
|
1065
1065
|
for (let bridge of (this.config.bridges || [])) {
|
1066
|
+
const valid = [ 'before', 'bridge', 'development', 'evaluator', 'generatorp', 'generatorr', 'generators', 'hierarchy', 'id', 'inverted', 'isA',
|
1067
|
+
'level', 'optional', 'selector', 'semantic', 'words' ]
|
1068
|
+
for (let prop of Object.keys(bridge)) {
|
1069
|
+
if (!valid.includes(prop)) {
|
1070
|
+
if (!prop.endsWith("Bridge")) {
|
1071
|
+
throw `Unknown property "${prop}" in the bridge. Valid properties are ${valid}. The bridge is ${JSON.stringify(bridge)}`
|
1072
|
+
}
|
1073
|
+
}
|
1074
|
+
}
|
1066
1075
|
/*
|
1067
1076
|
if (bridge.generator) {
|
1068
1077
|
this.config.generators.push({
|
@@ -1084,7 +1093,7 @@ class Config {
|
|
1084
1093
|
if (bridge.words) {
|
1085
1094
|
for (let def of bridge.words) {
|
1086
1095
|
if (typeof def == 'string') {
|
1087
|
-
this.addWordInternal(def, {"id": bridge.id, "initial": "{}" })
|
1096
|
+
this.addWordInternal(def, {"id": bridge.id, "initial": `{ value: "${def}"}` })
|
1088
1097
|
} else {
|
1089
1098
|
const word = def.word
|
1090
1099
|
def = { initial: JSON.stringify(def), id: bridge.id, word: undefined }
|