theprogrammablemind 7.10.0-beta.0 → 7.10.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 +1 -25
- package/package.json +1 -1
- package/src/config.js +21 -0
package/client.js
CHANGED
@@ -1025,31 +1025,7 @@ const showExamples = (testFile) => {
|
|
1025
1025
|
*/
|
1026
1026
|
|
1027
1027
|
const showInfo = (description, section, config) => {
|
1028
|
-
|
1029
|
-
const includes = config.configs.slice(1).map((km) => km.config.name)
|
1030
|
-
const visibleExamples = []
|
1031
|
-
for (const test of config.tests) {
|
1032
|
-
if (!test.developerTest) {
|
1033
|
-
visibleExamples.push(test.query)
|
1034
|
-
}
|
1035
|
-
}
|
1036
|
-
const templateQueries = []
|
1037
|
-
if (config.instances && config.instances.length > 0) {
|
1038
|
-
for (let query of config.instances.slice(-1)[0].queries) {
|
1039
|
-
if (typeof query == 'string') {
|
1040
|
-
templateQueries.push(query)
|
1041
|
-
}
|
1042
|
-
}
|
1043
|
-
}
|
1044
|
-
const info = { name, description, examples: visibleExamples, template: templateQueries, section, includes, demo: config.demo }
|
1045
|
-
/*
|
1046
|
-
if (config.instances.length > 0) {
|
1047
|
-
info.template = {
|
1048
|
-
base: config.instances[0].base
|
1049
|
-
}
|
1050
|
-
}
|
1051
|
-
*/
|
1052
|
-
console.log(JSON.stringify(info, null, 2))
|
1028
|
+
console.log(JSON.stringify(config.getInfo(), null, 2))
|
1053
1029
|
}
|
1054
1030
|
|
1055
1031
|
const submitBugToAPI = async (subscription_id, subscription_password, config) => {
|
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -722,6 +722,27 @@ class Config {
|
|
722
722
|
return base
|
723
723
|
}
|
724
724
|
|
725
|
+
getInfo () {
|
726
|
+
const name = this.name
|
727
|
+
const includes = this.configs.slice(1).map((km) => km.config.name)
|
728
|
+
const visibleExamples = []
|
729
|
+
for (const test of this.tests) {
|
730
|
+
if (!test.developerTest) {
|
731
|
+
visibleExamples.push(test.query)
|
732
|
+
}
|
733
|
+
}
|
734
|
+
const templateQueries = []
|
735
|
+
if (this.instances && this.instances.length > 0) {
|
736
|
+
for (let query of this.instances.slice(-1)[0].queries) {
|
737
|
+
if (typeof query == 'string') {
|
738
|
+
templateQueries.push(query)
|
739
|
+
}
|
740
|
+
}
|
741
|
+
}
|
742
|
+
const info = { name, description: this.description, examples: visibleExamples, template: templateQueries, includes }
|
743
|
+
return info
|
744
|
+
}
|
745
|
+
|
725
746
|
getPseudoConfig (uuid, config) {
|
726
747
|
return {
|
727
748
|
description: "this is a pseudo config that has limited functionality due to being available in the initializer function context",
|