theprogrammablemind_4wp 7.5.8-beta.70 → 7.5.8-beta.72
Sign up to get free protection for your applications and to get access to all the features.
- package/client.js +7 -1
- package/package.json +1 -1
- package/runtime.js +3 -1
- package/src/helpers.js +2 -4
- package/src/project.js +18 -7
package/client.js
CHANGED
@@ -1157,10 +1157,16 @@ const defaultInnerProcess = (config, errorHandler, responses) => {
|
|
1157
1157
|
}
|
1158
1158
|
const picked = pickEm()
|
1159
1159
|
if (!_.isEmpty(picked)) {
|
1160
|
-
console.log('--- checked
|
1160
|
+
console.log('--- Object showing only the checked values ---')
|
1161
1161
|
console.log(JSON.stringify(picked, null, 2))
|
1162
1162
|
}
|
1163
1163
|
|
1164
|
+
const pickedResultContexts = responses.contexts.map(pickContext(config.testConfig))
|
1165
|
+
if (pickedResultContexts.some( (context) => Object.keys(context).length > 0 )) {
|
1166
|
+
console.log('--- Contexts showing only the checked values ---')
|
1167
|
+
console.log(JSON.stringify(pickedResultContexts, null, 2))
|
1168
|
+
}
|
1169
|
+
|
1164
1170
|
console.log('--- The contexts are ----------')
|
1165
1171
|
console.log(JSON.stringify(sortJson(responses.contexts, { depth: 25 }), null, 2))
|
1166
1172
|
console.log('')
|
package/package.json
CHANGED
package/runtime.js
CHANGED
@@ -6,7 +6,9 @@ module.exports = {
|
|
6
6
|
stdout: "Should not be called in the browser",
|
7
7
|
},
|
8
8
|
child_process: "Should not be called in the browser",
|
9
|
-
fs:
|
9
|
+
fs: {
|
10
|
+
existsSync: () => false,
|
11
|
+
},
|
10
12
|
ArgumentParser: "Should not be called in the browser",
|
11
13
|
readline: "Should not be called in the browser",
|
12
14
|
jsonDiff: "Should not be called in the browser",
|
package/src/helpers.js
CHANGED
@@ -172,9 +172,6 @@ const isCompound = (value) => {
|
|
172
172
|
return isArray(value) || isObject(value)
|
173
173
|
}
|
174
174
|
|
175
|
-
nextCallId = 0
|
176
|
-
nextContextId = 0
|
177
|
-
|
178
175
|
class InitCalls {
|
179
176
|
|
180
177
|
constructor(name) {
|
@@ -198,9 +195,10 @@ class InitCalls {
|
|
198
195
|
// this.nextCallId += 1
|
199
196
|
// this.stack.push(this.nextCallId)
|
200
197
|
this.stack.push(this.nextCallId)
|
198
|
+
// TODO put the nextContextId in the context for debugging
|
201
199
|
const calls = this.stack.map( (call) => `${this.name}#call${call}` )
|
202
200
|
// return `Context#${this.nextContextId}: ${calls}`
|
203
|
-
return `Context#${nextContextId}: ${calls}`
|
201
|
+
return `Context#${this.nextContextId}: ${calls}`
|
204
202
|
}
|
205
203
|
|
206
204
|
current() {
|
package/src/project.js
CHANGED
@@ -11,13 +11,24 @@ const project = (object, filter) => {
|
|
11
11
|
} else {
|
12
12
|
for (let properties of filter) {
|
13
13
|
if (typeof properties == 'object') {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
if (properties.propertyLists) {
|
15
|
+
for (const propertyList in properties.propertyLists) {
|
16
|
+
for (const property of object[propertyList]) {
|
17
|
+
projection[property] = project(object[property], properties.propertyLists[propertyList])
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
if (properties.valueLists) {
|
22
|
+
for (const listProperty in properties.valueLists) {
|
23
|
+
const oldList = object[listProperty]
|
24
|
+
projection[listProperty] = oldList.map((element) => project(element, properties.valueLists[listProperty]))
|
25
|
+
}
|
26
|
+
}
|
27
|
+
if (properties.properties) {
|
28
|
+
for (const property in properties.properties) {
|
29
|
+
const old = object[property]
|
30
|
+
projection[property] = project(old, properties.properties[property])
|
31
|
+
}
|
21
32
|
}
|
22
33
|
} else {
|
23
34
|
if (!Array.isArray(properties)) {
|