theprogrammablemind 8.9.1-beta.28 → 8.9.1-beta.29

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 CHANGED
@@ -36,7 +36,7 @@ const getConfig_getObjectsCheck = (config, testConfig) => {
36
36
  }
37
37
 
38
38
  const getSuggestion = (diff) => {
39
- return diff.map( (element) => {
39
+ return diff.map((element) => {
40
40
  return element.marker
41
41
  })
42
42
  }
@@ -287,7 +287,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
287
287
  data.errors_ignore_contextual_priorities_non_existant_ops = true
288
288
  }
289
289
  let queries = query.split('\\n')
290
- let summaries = [] // for error
290
+ const summaries = [] // for error
291
291
  try {
292
292
  const response = {
293
293
  hierarchy: [],
@@ -555,7 +555,7 @@ const runTest = async (config, expected, { args, verbose, testConfig, debug, tim
555
555
  checkedContexts: pickedExpectedContexts,
556
556
  objects: expected_objects,
557
557
  config: expected.config,
558
- summaries: expected.summaries,
558
+ summaries: expected.summaries
559
559
  },
560
560
  actual: {
561
561
  responses: result.responses,
@@ -567,7 +567,7 @@ const runTest = async (config, expected, { args, verbose, testConfig, debug, tim
567
567
  checkedContexts: pickedResultContexts,
568
568
  objects: actual_objects,
569
569
  config: actual_config,
570
- summaries: result.summaries,
570
+ summaries: result.summaries
571
571
  }
572
572
  }
573
573
  }
@@ -978,7 +978,6 @@ const rebuildTemplate = async ({ config, instance, target, previousResultss, reb
978
978
  try {
979
979
  results = await _process(config, query.query, { initializer, rebuildingTemplate: true })
980
980
  } catch (e) {
981
- debugger
982
981
  if (e.summaries && e.summaries.length > 0) {
983
982
  suggestFix(e.summaries)
984
983
  }
@@ -1120,12 +1119,12 @@ const rebuildTemplate = async ({ config, instance, target, previousResultss, reb
1120
1119
  todo.push({ property: 'resultss', query, previousResults: pr, skipSemantics: false || query.skipSemantics })
1121
1120
  }
1122
1121
  }
1123
- todo = todo.concat((template.fragments || []).map((query, index) => {
1122
+ todo = todo.concat((template.fragments || []).map((query, index) => {
1124
1123
  const pr = instance.fragments[index]
1125
- return Object.assign({}, toProperties(query), { property: 'fragments', previousResults: pr, skipSemantics: false })
1124
+ return Object.assign({}, toProperties(query), { property: 'fragments', previousResults: pr, skipSemantics: false })
1126
1125
  }))
1127
- todo = todo.concat((template.semantics || []).map((definition) => {
1128
- return { property: 'semantics', query: `${definition.from}\n${definition.to}`, skipSemantics: true }
1126
+ todo = todo.concat((template.semantics || []).map((definition) => {
1127
+ return { property: 'semantics', query: `${definition.from}\n${definition.to}`, skipSemantics: true }
1129
1128
  }))
1130
1129
  await looper([...todo])
1131
1130
  }
@@ -1628,7 +1627,7 @@ const knowledgeModuleImpl = async ({
1628
1627
  if (!result.hasError) {
1629
1628
  continue
1630
1629
  }
1631
- const show = (label, expected, actual, { console_log=true } = {}) => {
1630
+ const show = (label, expected, actual, { console_log = true } = {}) => {
1632
1631
  if (JSON.stringify(expected) !== JSON.stringify(actual)) {
1633
1632
  if (console_log) {
1634
1633
  if (!headerShown) {
package/package.json CHANGED
@@ -67,6 +67,6 @@
67
67
  "sort-json": "^2.0.0",
68
68
  "uuid": "^8.3.2"
69
69
  },
70
- "version": "8.9.1-beta.28",
70
+ "version": "8.9.1-beta.29",
71
71
  "license": "UNLICENSED"
72
72
  }
package/src/config.js CHANGED
@@ -50,7 +50,8 @@ const debugPriority = (priority) => {
50
50
  }
51
51
  if (global.entodictonDebugPriority) {
52
52
  if (helpers.subPriority(entodictonDebugPriority, priority)) {
53
- debugger // debug hierarchy hit
53
+ // debug hierarchy hit
54
+ debugger // eslint-disable-line no-debugger
54
55
  }
55
56
  }
56
57
  }
@@ -61,7 +62,8 @@ const debugAssociation = (association) => {
61
62
  }
62
63
  if (global.entodictonDebugAssociation) {
63
64
  if (helpers.safeEquals(global.entodictonDebugAssociation, association)) {
64
- debugger // debug association hit
65
+ // debug association hit
66
+ debugger // eslint-disable-line no-debugger
65
67
  }
66
68
  }
67
69
  }
@@ -72,7 +74,8 @@ const debugWord = (word) => {
72
74
  }
73
75
  if (global.entodictonDebugWord) {
74
76
  if (helpers.safeEquals(global.entodictonDebugWord, word)) {
75
- debugger // debug word hit
77
+ // debug word hit
78
+ debugger // eslint-disable-line no-debugger
76
79
  }
77
80
  }
78
81
  }
@@ -83,7 +86,8 @@ const debugHierarchy = (pair) => {
83
86
  }
84
87
  if (global.entodictonDebugHierarchy) {
85
88
  if (helpers.safeEquals(global.entodictonDebugHierarchy, pair)) {
86
- debugger // debug hierarchy hit
89
+ // debug hierarchy hit
90
+ debugger // eslint-disable-line no-debugger
87
91
  }
88
92
  }
89
93
  }
@@ -94,7 +98,8 @@ const debugBridge = (bridge) => {
94
98
  }
95
99
  if (global.entodictonDebugBridge) {
96
100
  if (global.entodictonDebugBridge == bridge.id) {
97
- debugger // debug hierarchy hit
101
+ // debug hierarchy hit
102
+ debugger // eslint-disable-line no-debugger
98
103
  }
99
104
  }
100
105
  }
@@ -105,7 +110,8 @@ const debugOperator = (operator) => {
105
110
  }
106
111
  if (global.entodictonDebugOperator) {
107
112
  if ((operator.pattern || operator) === global.entodictonDebugOperator) {
108
- debugger // debug operator hit
113
+ // debug operator hit
114
+ debugger // eslint-disable-line no-debugger
109
115
  }
110
116
  }
111
117
  }
@@ -193,7 +199,7 @@ const validConfigProps = (config) => {
193
199
  // TODO add more type checks
194
200
  if (config.associations) {
195
201
  if (!config.associations.positive && !config.associations.negative) {
196
- throw new Error(`Expected the 'associations' property to be a hash with 'positive' and or 'negative' properties`)
202
+ throw new Error('Expected the \'associations\' property to be a hash with \'positive\' and or \'negative\' properties')
197
203
  }
198
204
  }
199
205
  }
@@ -2007,9 +2013,6 @@ class Config {
2007
2013
  Object.assign(args, addedArgs)
2008
2014
  if (getUUIDScoped) {
2009
2015
  const currentGetUUIDScoped = args.getUUIDScoped
2010
- if (!currentGetUUIDScoped) {
2011
- debugger
2012
- }
2013
2016
  args.getUUIDScoped = (uuid) => Object.assign(currentGetUUIDScoped(uuid), getUUIDScoped(uuid))
2014
2017
  }
2015
2018
  }
@@ -2137,7 +2140,6 @@ class Config {
2137
2140
  // TODO add more details
2138
2141
  equal (config) {
2139
2142
  if (JSON.stringify(this.config) != JSON.stringify(config.config)) {
2140
- debugger
2141
2143
  return false
2142
2144
  }
2143
2145
  return true
@@ -2194,9 +2196,6 @@ class Config {
2194
2196
  }
2195
2197
  cp.mapUUIDs(map)
2196
2198
 
2197
- if (cp._uuid == 'concept2') {
2198
- // debugger
2199
- }
2200
2199
  if (options.callInitializers) {
2201
2200
  await cp.rebuild(options) // in copy
2202
2201
  } else {
@@ -2602,8 +2601,6 @@ class Config {
2602
2601
  args.currentConfig.wasInitialized = true
2603
2602
  }
2604
2603
  */
2605
- // debugger
2606
- // greg55
2607
2604
  config.initializerFn(args, { dontCallFn: true })
2608
2605
  initAfterApis.unshift({ config, args })
2609
2606
  if (config._api) {
@@ -256,7 +256,7 @@ const setupContexts = (rawContexts) => {
256
256
  context.context_index = _index
257
257
  ++_index
258
258
  }
259
- contexts.forEach( id )
259
+ contexts.forEach(id)
260
260
  return contexts
261
261
  }
262
262
 
package/src/digraph.js CHANGED
@@ -17,7 +17,6 @@ class Digraph {
17
17
 
18
18
  // BFS
19
19
  path (from, to) {
20
- debugger
21
20
  const frontier = { [from]: [[]] }
22
21
  const done = new Set()
23
22
  while (Object.keys(frontier).length > 0) {
@@ -155,7 +154,6 @@ class Digraph {
155
154
  if (nodes.length === 0) {
156
155
  return new Set([])
157
156
  }
158
- debugger
159
157
  nodes = Array.from(nodes)
160
158
  let common = this.ancestors(nodes[0], { includeSelf: true })
161
159
 
package/src/generators.js CHANGED
@@ -66,7 +66,8 @@ class Generator {
66
66
  const matches = await this.match(args)
67
67
  if ((matches && (options.debug || {}).match) ||
68
68
  callId == this.callId) {
69
- debugger // next line is the matcher
69
+ // next line is the matcher
70
+ debugger // eslint-disable-line no-debugger
70
71
  await this.match(args)
71
72
  }
72
73
  return matches
@@ -118,16 +119,9 @@ class Generator {
118
119
  if (this.property == 'generatorp') {
119
120
  args.g = args.gp
120
121
  }
121
- // if (this.callId) {
122
- // greg
123
- /*
124
- if (callId == 'call11' && this.callId) {
125
- debugger;
126
- }
127
- */
128
122
  if ((options.debug || {}).apply ||
129
123
  callId == this.callId) {
130
- debugger
124
+ debugger // eslint-disable-line no-debugger
131
125
  }
132
126
  return await this._apply(args)
133
127
  }
package/src/helpers.js CHANGED
@@ -27,7 +27,7 @@ function where (goUp = 2) {
27
27
  }
28
28
  }
29
29
 
30
- function suggestAssociationsFix(esummary, asummary) {
30
+ function suggestAssociationsFix (esummary, asummary) {
31
31
  for (let isummary = 0; isummary < esummary.length; ++isummary) {
32
32
  if (!deepEqual(esummary[isummary], asummary[isummary])) {
33
33
  return esummary[isummary].operators
@@ -36,7 +36,7 @@ function suggestAssociationsFix(esummary, asummary) {
36
36
  return []
37
37
  }
38
38
 
39
- function suggestAssociationsFixFromSummaries(esummaries, asummaries) {
39
+ function suggestAssociationsFixFromSummaries (esummaries, asummaries) {
40
40
  for (let isummaries = 0; isummaries < esummaries.length; ++isummaries) {
41
41
  const esummary = esummaries[isummaries].summaries
42
42
  const asummary = asummaries[isummaries].summaries
@@ -461,5 +461,5 @@ module.exports = {
461
461
  where,
462
462
  w,
463
463
  suggestAssociationsFix,
464
- suggestAssociationsFixFromSummaries,
464
+ suggestAssociationsFixFromSummaries
465
465
  }
package/src/semantics.js CHANGED
@@ -73,7 +73,8 @@ class Semantic {
73
73
  this.fixUpArgs(args, context)
74
74
  const matches = await this.matcher(args)
75
75
  if (matches && (options.debug || {}).match || args.callId == this.callId) {
76
- debugger // next line is the matcher
76
+ // next line is the matcher
77
+ debugger // eslint-disable-line no-debugger
77
78
  await this.matcher(args)
78
79
  }
79
80
  return matches
@@ -92,10 +93,10 @@ class Semantic {
92
93
  this.fixUpArgs(args, contextPrime)
93
94
 
94
95
  if ((options.debug || {}).apply || args.callId == this.callId) {
95
- debugger
96
+ debugger // eslint-disable-line no-debugger
96
97
  }
97
98
  if (args.breakOnSemantics) {
98
- debugger
99
+ debugger // eslint-disable-line no-debugger
99
100
  }
100
101
  await this._apply(args)
101
102
  return contextPrime
@@ -166,9 +167,6 @@ class Semantics {
166
167
  args.log = (message) => { this.logs.push(message) }
167
168
  for (const isemantic in this.semantics) {
168
169
  const semantic = this.semantics[isemantic]
169
- if (!semantic) {
170
- debugger
171
- }
172
170
  // only one question at a time
173
171
  if (semantic.isQuestion && seenQuestion) {
174
172
  continue