botinabox 2.1.0 → 2.1.1
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/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -399,7 +399,7 @@ declare function loadConfig(opts?: {
|
|
|
399
399
|
overrides?: Partial<BotConfig>;
|
|
400
400
|
env?: Record<string, string | undefined>;
|
|
401
401
|
}): ConfigLoadResult;
|
|
402
|
-
/** Get the loaded config singleton.
|
|
402
|
+
/** Get the loaded config singleton. Auto-initializes with defaults if not loaded. */
|
|
403
403
|
declare function getConfig(): BotConfig;
|
|
404
404
|
/** Initialize the config singleton. Returns errors if any. */
|
|
405
405
|
declare function initConfig(opts?: Parameters<typeof loadConfig>[0]): ConfigLoadError[];
|
package/dist/index.js
CHANGED
|
@@ -290,7 +290,9 @@ function loadConfig(opts) {
|
|
|
290
290
|
}
|
|
291
291
|
var _config = null;
|
|
292
292
|
function getConfig() {
|
|
293
|
-
if (!_config)
|
|
293
|
+
if (!_config) {
|
|
294
|
+
initConfig({});
|
|
295
|
+
}
|
|
294
296
|
return _config;
|
|
295
297
|
}
|
|
296
298
|
function initConfig(opts) {
|