theprogrammablemind_4wp 7.5.8-beta.28 → 7.5.8-beta.29
Sign up to get free protection for your applications and to get access to all the features.
- package/client.js +37 -1
- package/package.json +1 -1
- package/src/config.js +0 -3
package/client.js
CHANGED
@@ -700,7 +700,12 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
|
|
700
700
|
|
701
701
|
if (writeTests) {
|
702
702
|
const actual_config = getConfigForTest(config, testConfig)
|
703
|
-
|
703
|
+
const saveObjects = {...config.config.objects}
|
704
|
+
saveObjects.nameToUUID = {}
|
705
|
+
for (let km of config.configs) {
|
706
|
+
saveObjects.nameToUUID[km.name] = km.uuid
|
707
|
+
}
|
708
|
+
writeTest(testsFN, query, saveObjects, response.generated, response.paraphrases, response.responses, response.contexts, response.associations, response.metadata, actual_config, saveDeveloper, response.paraphrasesParenthesized, response.generatedParenthesized)
|
704
709
|
}
|
705
710
|
|
706
711
|
return response
|
@@ -1157,6 +1162,37 @@ const defaultInnerProcess = (config, errorHandler, responses) => {
|
|
1157
1162
|
} else {
|
1158
1163
|
console.log('objects', runtime.util.inspect(config.get('objects'), { depth: Infinity, sorted: true }))
|
1159
1164
|
}
|
1165
|
+
|
1166
|
+
const pickEm = () => {
|
1167
|
+
const picked = {}
|
1168
|
+
const namespaced = config.get('objects')['namespaced']
|
1169
|
+
for (let prop of (config.testConfig.check || [])) {
|
1170
|
+
if (prop.km) {
|
1171
|
+
/*
|
1172
|
+
const objects = namespaced[prop.km]]
|
1173
|
+
picked[prop.km] = {}
|
1174
|
+
for (let p of c.testConfig.check) {
|
1175
|
+
if (p.km) {
|
1176
|
+
continue
|
1177
|
+
}
|
1178
|
+
picked[p] = objects[p]
|
1179
|
+
}
|
1180
|
+
*/
|
1181
|
+
console.log('TODO implement this if needed')
|
1182
|
+
} else {
|
1183
|
+
const objects = namespaced[config.uuid]
|
1184
|
+
picked[prop] = objects[prop]
|
1185
|
+
}
|
1186
|
+
}
|
1187
|
+
return picked
|
1188
|
+
}
|
1189
|
+
|
1190
|
+
const picked = pickEm()
|
1191
|
+
if (!_.isEmpty(picked)) {
|
1192
|
+
console.log('--- checked object properties ---')
|
1193
|
+
console.log(JSON.stringify(picked, null, 2))
|
1194
|
+
}
|
1195
|
+
|
1160
1196
|
console.log('--- The contexts are ----------')
|
1161
1197
|
console.log(JSON.stringify(sortJson(responses.contexts, { depth: 25 }), null, 2))
|
1162
1198
|
console.log('')
|
package/package.json
CHANGED