theprogrammablemind 7.12.3-beta.2 → 7.12.3-beta.4
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 +12 -3
- 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) =>
|
2147
|
+
await knowledgeModuleImpl(...args).catch((e) => {
|
2148
|
+
console.error(e)
|
2149
|
+
process.exit(-1)
|
2150
|
+
})
|
2142
2151
|
}
|
2143
2152
|
|
2144
2153
|
module.exports = {
|