@axium/server 0.36.1 → 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 +3 -2
- package/dist/config.js +2 -2
- package/dist/database.js +1 -1
- package/package.json +1 -1
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/dist/database.js
CHANGED
|
@@ -738,7 +738,7 @@ export async function applyDelta(delta, forceAbort = false) {
|
|
|
738
738
|
}
|
|
739
739
|
for (const [colName, column] of Object.entries(tableDelta.alter_columns)) {
|
|
740
740
|
if (column.default)
|
|
741
|
-
await query.alterColumn(colName, col => col.setDefault(
|
|
741
|
+
await query.alterColumn(colName, col => col.setDefault(column.default)).execute();
|
|
742
742
|
if (column.type)
|
|
743
743
|
await query.alterColumn(colName, col => col.setDataType(sql.raw(column.type))).execute();
|
|
744
744
|
for (const op of column.ops ?? []) {
|