@axium/server 0.33.0 → 0.33.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/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/dist/database.d.ts +4 -4
- package/dist/database.js +2 -2
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/schemas/config.json +3 -1
- package/schemas/db.json +3 -2
package/dist/config.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const Config: z.ZodObject<{
|
|
|
21
21
|
}, z.core.$loose>>;
|
|
22
22
|
db: z.ZodOptional<z.ZodObject<{
|
|
23
23
|
host: z.ZodOptional<z.ZodString>;
|
|
24
|
-
port: z.ZodOptional<z.
|
|
24
|
+
port: z.ZodOptional<z.ZodInt>;
|
|
25
25
|
password: z.ZodOptional<z.ZodString>;
|
|
26
26
|
user: z.ZodOptional<z.ZodString>;
|
|
27
27
|
database: z.ZodOptional<z.ZodString>;
|
|
@@ -97,7 +97,7 @@ export declare const ConfigFile: z.ZodObject<{
|
|
|
97
97
|
}, z.core.$loose>>>;
|
|
98
98
|
db: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
99
99
|
host: z.ZodOptional<z.ZodString>;
|
|
100
|
-
port: z.ZodOptional<z.
|
|
100
|
+
port: z.ZodOptional<z.ZodInt>;
|
|
101
101
|
password: z.ZodOptional<z.ZodString>;
|
|
102
102
|
user: z.ZodOptional<z.ZodString>;
|
|
103
103
|
database: z.ZodOptional<z.ZodString>;
|
package/dist/config.js
CHANGED
package/dist/database.d.ts
CHANGED
|
@@ -439,7 +439,7 @@ export declare const SchemaFile: z.ZodObject<{
|
|
|
439
439
|
drop_indexes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodTemplateLiteral<`${string}:${string}`>>>>;
|
|
440
440
|
}, z.core.$strict>], "delta">>;
|
|
441
441
|
wipe: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
442
|
-
latest: z.ZodOptional<z.
|
|
442
|
+
latest: z.ZodOptional<z.ZodInt32>;
|
|
443
443
|
acl_tables: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
444
444
|
}, z.core.$strip>;
|
|
445
445
|
export interface SchemaFile extends z.infer<typeof SchemaFile> {
|
|
@@ -555,11 +555,11 @@ export declare function getFullSchema(opt?: {
|
|
|
555
555
|
versions: Record<string, number>;
|
|
556
556
|
};
|
|
557
557
|
export declare const UpgradesInfo: z.ZodObject<{
|
|
558
|
-
current: z.ZodDefault<z.ZodRecord<z.ZodString, z.
|
|
558
|
+
current: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodInt32>>;
|
|
559
559
|
upgrades: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
560
560
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
561
|
-
from: z.ZodRecord<z.ZodString, z.
|
|
562
|
-
to: z.ZodRecord<z.ZodString, z.
|
|
561
|
+
from: z.ZodRecord<z.ZodString, z.ZodInt32>;
|
|
562
|
+
to: z.ZodRecord<z.ZodString, z.ZodInt32>;
|
|
563
563
|
}, z.core.$strip>>>;
|
|
564
564
|
}, z.core.$strip>;
|
|
565
565
|
export interface UpgradesInfo extends z.infer<typeof UpgradesInfo> {
|
package/dist/database.js
CHANGED
|
@@ -352,7 +352,7 @@ export const SchemaFile = z.object({
|
|
|
352
352
|
/** List of tables to wipe */
|
|
353
353
|
wipe: z.string().array().optional().default([]),
|
|
354
354
|
/** Set the latest version, defaults to the last one */
|
|
355
|
-
latest: z.
|
|
355
|
+
latest: z.int32().nonnegative().optional(),
|
|
356
356
|
/** Maps tables to their ACL tables, e.g. `"storage": "acl.storage"` */
|
|
357
357
|
acl_tables: z.record(z.string(), z.string()).optional().default({}),
|
|
358
358
|
});
|
|
@@ -416,7 +416,7 @@ const schemaToIntrospected = {
|
|
|
416
416
|
integer: 'int4',
|
|
417
417
|
'text[]': '_text',
|
|
418
418
|
};
|
|
419
|
-
const VersionMap = z.record(z.string(), z.
|
|
419
|
+
const VersionMap = z.record(z.string(), z.int32().nonnegative());
|
|
420
420
|
export const UpgradesInfo = z.object({
|
|
421
421
|
current: VersionMap.default({}),
|
|
422
422
|
upgrades: z.object({ timestamp: z.coerce.date(), from: VersionMap, to: VersionMap }).array().default([]),
|
package/dist/main.js
CHANGED
|
@@ -66,7 +66,7 @@ import * as z from 'zod';
|
|
|
66
66
|
import $pkg from '../package.json' with { type: 'json' };
|
|
67
67
|
import { audit, getEvents, styleSeverity } from './audit.js';
|
|
68
68
|
import { diffUpdate, lookupUser, userText } from './cli.js';
|
|
69
|
-
import config, {
|
|
69
|
+
import config, { ConfigFile, configFiles, saveConfigTo } from './config.js';
|
|
70
70
|
import * as db from './database.js';
|
|
71
71
|
import { _portActions, _portMethods, restrictedPorts } from './io.js';
|
|
72
72
|
import { linkRoutes, listRouteLinks, unlinkRoutes, writePluginHooks } from './linking.js';
|
package/package.json
CHANGED
package/schemas/config.json
CHANGED