theprogrammablemind_4wp 7.5.8-beta.44 → 7.5.8-beta.46

Sign up to get free protection for your applications and to get access to all the features.
package/client.js CHANGED
@@ -60,7 +60,6 @@ const vimdiff = (actualJSON, expectedJSON) => {
60
60
  // console.log(`vimdiff ${path}/actual.json ${path}/expected.json`)
61
61
  {
62
62
  const editor = runtime.process.env.EDITOR || 'vimdiff'
63
- debugger
64
63
  // const child = runtime.child_process.spawn(editor, [`${path}/expected.json`, `${path}/actual.json`], { stdio: 'inherit' })
65
64
  console.log(`${editor} ${path}/expected.json ${path}/actual.json`)
66
65
  runtime.child_process.execSync(`${editor} ${path}/expected.json ${path}/actual.json`, {stdio: 'inherit'})
@@ -1493,7 +1492,7 @@ const knowledgeModule = async ({
1493
1492
  if (!isProcess) {
1494
1493
  if (template) {
1495
1494
  if (config.needsRebuild(template.template, template.instance)) {
1496
- throw new Error(`This module "${config.name}" cannot be used because the instance file needs rebuilding. Run on the command line with no arguements or the -rt argument to rebuild.`)
1495
+ throw new Error(`This module "${config.name}" cannot be used because the instance file needs rebuilding. Run on the command line with no arguments or the -rt argument to rebuild.`)
1497
1496
  }
1498
1497
  try {
1499
1498
  config.load(template.template, template.instance)
package/package.json CHANGED
@@ -63,6 +63,6 @@
63
63
  "json-stable-stringify": "^1.0.1",
64
64
  "node-fetch": "^2.6.1"
65
65
  },
66
- "version": "7.5.8-beta.44",
66
+ "version": "7.5.8-beta.46",
67
67
  "license": "ISC"
68
68
  }
package/src/config.js CHANGED
@@ -70,9 +70,6 @@ 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)
76
73
  const apis = (name) => config.getConfig(name).api
77
74
 
78
75
  return {
@@ -943,7 +940,10 @@ class Config {
943
940
  return { ...query, where: undefined }
944
941
  }
945
942
  }
946
- const sameQueries = helpers.safeEquals((cleanupWhere(template.queries) || []).map(helpers.updateQueries), (cleanupWhere(instance.queries) || []))
943
+ const cleanupWheres = (elements) => {
944
+ return elements.map( cleanupWhere )
945
+ }
946
+ const sameQueries = helpers.safeEquals(cleanupWheres(template.queries || []).map(helpers.updateQueries), cleanupWheres(instance.queries || []))
947
947
  return !(instance && sameQueries && sameFragments)
948
948
  }
949
949
 
package/src/helpers.js CHANGED
@@ -53,6 +53,8 @@ const safeEquals = (v1, v2) => {
53
53
  return v1 == v2
54
54
  } else if (type == 'function') {
55
55
  return v1.toString() == v2.toString()
56
+ } else if (v1 == undefined || v2 == undefined) {
57
+ return v1 == v2
56
58
  } else {
57
59
  if (v1.length != v2.length) {
58
60
  return false