theprogrammablemind 7.5.8-beta.42 → 7.5.8-beta.44
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 -6
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -70,6 +70,9 @@ const setupInitializerFNArgs = (config, args) => {
|
|
70
70
|
const aw = (word, def) => config.addWord(word, def, args.uuid)
|
71
71
|
const ag = (generator) => config.addGenerator(generator, args.uuid, config.name)
|
72
72
|
const km = (name) => config.getConfig(name)
|
73
|
+
console.log('name', name)
|
74
|
+
console.log('config.getConfig', config.getConfig)
|
75
|
+
console.log('config', config)
|
73
76
|
const apis = (name) => config.getConfig(name).api
|
74
77
|
|
75
78
|
return {
|
@@ -933,13 +936,14 @@ class Config {
|
|
933
936
|
const instanceFragments = (instance.fragments || []).map((fragment) => fragment.key || fragment.query).map( toCanonical )
|
934
937
|
const templateFragments = (template.fragments || []).concat(this.dynamicFragments).map( toCanonical )
|
935
938
|
const sameFragments = helpers.safeEquals(templateFragments, instanceFragments)
|
936
|
-
const
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
939
|
+
const cleanupWhere = (query) => {
|
940
|
+
if (typeof query == 'string') {
|
941
|
+
return query
|
942
|
+
} else {
|
943
|
+
return { ...query, where: undefined }
|
944
|
+
}
|
942
945
|
}
|
946
|
+
const sameQueries = helpers.safeEquals((cleanupWhere(template.queries) || []).map(helpers.updateQueries), (cleanupWhere(instance.queries) || []))
|
943
947
|
return !(instance && sameQueries && sameFragments)
|
944
948
|
}
|
945
949
|
|