@matatbread/matbot-core 0.1.4 → 0.1.6

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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "node",
5
5
  "browser"
6
6
  ],
7
- "version": "0.1.4",
7
+ "version": "0.1.6",
8
8
  "engines": {
9
9
  "node": ">=24.0.0"
10
10
  },
@@ -28,7 +28,7 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@matatbread/matbot-plugin-api": "0.1.4"
31
+ "@matatbread/matbot-plugin-api": "0.1.6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "typescript": "^5.8.0"
@@ -74,7 +74,7 @@ export function parseConfig(
74
74
  // plugins: optional ordered list of specifiers
75
75
  const pluginsRaw = doc['plugins'];
76
76
  const plugins: string[] = [];
77
- if (pluginsRaw !== undefined) {
77
+ if (pluginsRaw !== undefined && pluginsRaw !== null) {
78
78
  if (!Array.isArray(pluginsRaw)) {
79
79
  throw new Error('Config: "plugins" must be a sequence (list)');
80
80
  }
@@ -86,7 +86,7 @@ export function parseConfig(
86
86
  const providersRaw = doc['providers'];
87
87
  const providers = new Map<string, ProviderConfig>();
88
88
 
89
- if (providersRaw !== undefined) {
89
+ if (providersRaw !== undefined && providersRaw !== null) {
90
90
  const providersMap = asRecord(providersRaw, 'providers');
91
91
  for (const [name, raw] of Object.entries(providersMap)) {
92
92
  providers.set(name, toProviderConfig(name, asRecord(raw, `providers.${name}`)));