theprogrammablemind_4wp 7.12.3-beta.2 → 7.12.3-beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/client.js +12 -3
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -1466,6 +1466,7 @@ const knowledgeModuleImpl = async ({
1466
1466
  errorHandler = defaultErrorHandler,
1467
1467
  process: processResults = defaultProcess,
1468
1468
  stopAtFirstFailure = true,
1469
+ acceptsAdditionalConfig = false,
1469
1470
  ...rest
1470
1471
  } = {}) => {
1471
1472
  /*
@@ -2078,11 +2079,16 @@ const knowledgeModuleImpl = async ({
2078
2079
  }
2079
2080
  }
2080
2081
 
2081
- createConfigExport = () => {
2082
+ createConfigExport = (additionalConfig) => {
2082
2083
  if (createConfig.cached) {
2083
2084
  return createConfig.cached
2084
2085
  }
2085
- const config = createConfig()
2086
+ const config = createConfig(acceptsAdditionalConfig ? additionalConfig : null)
2087
+ if (!acceptsAdditionalConfig && additionalConfig) {
2088
+ config.stop_auto_rebuild()
2089
+ additionalConfig(config)
2090
+ config.restart_auto_rebuild()
2091
+ }
2086
2092
  initConfig(config)
2087
2093
  // config.rebuild({ isModule: true })
2088
2094
  createConfig.cached = config
@@ -2138,7 +2144,10 @@ function w (func) {
2138
2144
  }
2139
2145
 
2140
2146
  const knowledgeModule = async (...args) => {
2141
- await knowledgeModuleImpl(...args).catch((e) => console.error(e))
2147
+ await knowledgeModuleImpl(...args).catch((e) => {
2148
+ console.error(e)
2149
+ process.exit(-1)
2150
+ })
2142
2151
  }
2143
2152
 
2144
2153
  module.exports = {
package/package.json CHANGED
@@ -65,6 +65,6 @@
65
65
  "json-stable-stringify": "^1.0.1",
66
66
  "node-fetch": "^2.6.1"
67
67
  },
68
- "version": "7.12.3-beta.2",
68
+ "version": "7.12.3-beta.4",
69
69
  "license": "UNLICENSED"
70
70
  }