@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 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.ZodNumber>;
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.ZodNumber>;
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
@@ -43,7 +43,7 @@ export const Config = z
43
43
  db: z
44
44
  .looseObject({
45
45
  host: z.string(),
46
- port: z.number(),
46
+ port: z.int().min(1).max(65535),
47
47
  password: z.string(),
48
48
  user: z.string(),
49
49
  database: z.string(),
@@ -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.ZodNumber>;
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.ZodInt>>;
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.ZodInt>;
562
- to: z.ZodRecord<z.ZodString, z.ZodInt>;
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.number().nonnegative().optional(),
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.int().nonnegative());
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, { configFiles, ConfigFile, saveConfigTo } from './config.js';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -103,7 +103,9 @@
103
103
  "type": "string"
104
104
  },
105
105
  "port": {
106
- "type": "number"
106
+ "type": "integer",
107
+ "minimum": 1,
108
+ "maximum": 65535
107
109
  },
108
110
  "password": {
109
111
  "type": "string"
package/schemas/db.json CHANGED
@@ -875,8 +875,9 @@
875
875
  }
876
876
  },
877
877
  "latest": {
878
- "type": "number",
879
- "minimum": 0
878
+ "type": "integer",
879
+ "minimum": 0,
880
+ "maximum": 2147483647
880
881
  },
881
882
  "acl_tables": {
882
883
  "default": {},