@axium/server 0.36.2 → 0.36.3

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/api/admin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AuditFilter, Severity, UserAdminChange } from '@axium/core';
2
- import { errorText, writeJSON } from '@axium/core/node/io';
2
+ import { debug, errorText, writeJSON } from '@axium/core/node/io';
3
3
  import { getVersionInfo } from '@axium/core/node/packages';
4
4
  import { _findPlugin, plugins, PluginUpdate, serverConfigs } from '@axium/core/plugins';
5
5
  import { jsonObjectFrom } from 'kysely/helpers/postgres';
@@ -72,8 +72,9 @@ addRoute({
72
72
  if (!plugin._configPath)
73
73
  error(503, 'Plugin configuration path is not set');
74
74
  plugin.config ||= {};
75
+ debug('Updating plugin config:', name);
75
76
  const parsed = await schema.parseAsync(config).catch(e => error(400, errorText(e)));
76
- deepAssign(plugin.config, parsed);
77
+ deepAssign(plugin.config, parsed, true);
77
78
  mkdirSync(dirname(plugin._configPath), { recursive: true });
78
79
  writeJSON(plugin._configPath, plugin.config);
79
80
  }
package/dist/config.js CHANGED
@@ -173,7 +173,7 @@ export const ConfigFile = z
173
173
  * Update the current config
174
174
  */
175
175
  export function setConfig(other) {
176
- deepAssign(config, other);
176
+ deepAssign(config, other, true);
177
177
  logger.detach(io);
178
178
  if (config.log.console)
179
179
  logger.attach(io, { output: config.log.level });
@@ -239,7 +239,7 @@ export async function loadConfig(path, options = {}) {
239
239
  continue;
240
240
  try {
241
241
  const data = io.readJSON(configPath, serverConfig.schema.partial());
242
- deepAssign(plugin.config, data);
242
+ deepAssign(plugin.config, data, true);
243
243
  io.debug(`Loaded config for plugin ${plugin.name} from ${configPath}`);
244
244
  }
245
245
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.36.2",
3
+ "version": "0.36.3",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",