theprogrammablemind_4wp 9.3.0-beta.11 → 9.3.0-beta.12
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 +3 -3
- package/package.json +1 -1
- package/src/config.js +2 -2
- package/src/configHelpers.js +4 -2
package/client.js
CHANGED
@@ -260,7 +260,7 @@ const throwErrorHandler = (error) => {
|
|
260
260
|
throw error
|
261
261
|
}
|
262
262
|
|
263
|
-
const _process = async (config, query, { initializer, commandLineArgs, credentials, writeTests,
|
263
|
+
const _process = async (config, query, { initializer, commandLineArgs, credentials, writeTests, isProcess, isModule, isTest, saveDeveloper, rebuildingTemplate, testConfig, testsFN, errorHandler = throwErrorHandler } = {}) => {
|
264
264
|
if (credentials) {
|
265
265
|
config.server(credentials.server, credentials.key)
|
266
266
|
}
|
@@ -624,7 +624,7 @@ const saveTest = async (testFile, config, test, expected, testConfig, saveDevelo
|
|
624
624
|
await config.rebuild()
|
625
625
|
const objects = getObjects(config.config.objects)(config.uuid)
|
626
626
|
console.log(test)
|
627
|
-
const result = await _process(config, test, { isTest: true, isProcess: true, isModule:
|
627
|
+
const result = await _process(config, test, { isTest: true, isProcess: true, isModule: true })
|
628
628
|
// const actualObjects = config.config.objects
|
629
629
|
const actualConfig = getConfigForTest(config, testConfig)
|
630
630
|
const args = {
|
@@ -1880,7 +1880,7 @@ const knowledgeModuleImpl = async ({
|
|
1880
1880
|
global.beforeObjects = _.cloneDeep(objects)
|
1881
1881
|
}
|
1882
1882
|
try {
|
1883
|
-
await processResults(_process(config, args.query, { isProcess, isModule: !isProcess,
|
1883
|
+
await processResults(_process(config, args.query, { commandLineArgs: args, isProcess, isModule: !isProcess, dontAddAssociations: args.dontAddAssociations, writeTests: args.save || args.saveDeveloper, saveDeveloper: args.saveDeveloper, testConfig, testsFN: test }))
|
1884
1884
|
} catch (error) {
|
1885
1885
|
console.log('Error', error)
|
1886
1886
|
}
|
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -1055,8 +1055,8 @@ class Config {
|
|
1055
1055
|
|
1056
1056
|
// value is in response field
|
1057
1057
|
// TODO maybe generalize out query+evaluate along the lines of set value and set reference
|
1058
|
-
async getEvaluator (s, calls, log, context) {
|
1059
|
-
const instance = await s({ ...context, evaluate: true })
|
1058
|
+
async getEvaluator (s, calls, log, context, args) {
|
1059
|
+
const instance = await s({ ...args, ...context, evaluate: true })
|
1060
1060
|
calls.touch(instance)
|
1061
1061
|
if (!instance.evalue && !instance.verbatim && !instance.value) {
|
1062
1062
|
this.warningNotEvaluated(log, context)
|
package/src/configHelpers.js
CHANGED
@@ -140,7 +140,7 @@ const setupArgs = (args, config, logs, hierarchy, uuidForScoping) => {
|
|
140
140
|
if (!c) {
|
141
141
|
return
|
142
142
|
}
|
143
|
-
return config.getEvaluator(args.s, args.calls, logs, c)
|
143
|
+
return config.getEvaluator(args.s, args.calls, logs, c, { isModule: args.isModule, isProcess: args.isProcess })
|
144
144
|
}
|
145
145
|
args.gs = gs(args.g)
|
146
146
|
args.gsp = gs(args.gp)
|
@@ -279,7 +279,7 @@ const setupContexts = (rawContexts) => {
|
|
279
279
|
return contexts
|
280
280
|
}
|
281
281
|
|
282
|
-
const processContextsB = async ({ config,
|
282
|
+
const processContextsB = async ({ config, hierarchy, semantics, generators, json, isTest, isProcess, isModule, rebuildingTemplate, isInstance, instance, query, data, retries, url, commandLineArgs, forTemplate }) => {
|
283
283
|
// TODO fix this name to contextsPrime
|
284
284
|
const contextsPrime = []
|
285
285
|
const generatedPrime = []
|
@@ -468,6 +468,8 @@ const loadInstance = async (config, instance) => {
|
|
468
468
|
const args = { config, hierarchy, json: results, commandLineArgs: {}, forTemplate: true }
|
469
469
|
args.isInstance = `instance${i}`
|
470
470
|
args.instance = ''
|
471
|
+
args.isProcess = !config.isModule
|
472
|
+
args.isModule = !!config.isModule
|
471
473
|
await processContextsB(args)
|
472
474
|
if (results.skipSemantics) {
|
473
475
|
config.config.skipSemantics = null
|