mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Update node config schema for relay property
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { ZodSchema, z } from "zod";
|
||||
|
||||
import { array, boolean, literal, number, object, string, union } from "zod";
|
||||
import { array, literal, number, object, string, union } from "zod";
|
||||
|
||||
export interface SuccessResponse {
|
||||
success: true;
|
||||
@@ -23,7 +23,7 @@ export const nodeConfigSchema = object({
|
||||
connect: array(string()),
|
||||
externalAddresses: array(string()),
|
||||
network: union([literal("main"), literal("test")]),
|
||||
relay: boolean(),
|
||||
relay: union([literal("always"), literal("never"), literal("auto")]),
|
||||
limits: object({
|
||||
routingMaxSize: number(),
|
||||
routingMaxAge: number(),
|
||||
|
||||
@@ -16,7 +16,7 @@ import * as readline from "node:readline/promises";
|
||||
import * as Process from "./process.js";
|
||||
import { randomTag } from "@tests/support/support.js";
|
||||
import { sleep } from "@app/lib/sleep.js";
|
||||
import { array, boolean, literal, number, object, string, union, z } from "zod";
|
||||
import { array, literal, number, object, string, union, z } from "zod";
|
||||
import { logPrefix } from "./logPrefix.js";
|
||||
|
||||
export type RefsUpdate =
|
||||
@@ -132,7 +132,7 @@ export const NodeConfigSchema = object({
|
||||
connect: array(string()),
|
||||
externalAddresses: array(string()),
|
||||
network: union([literal("main"), literal("test")]),
|
||||
relay: boolean(),
|
||||
relay: union([literal("always"), literal("never"), literal("auto")]),
|
||||
limits: object({
|
||||
routingMaxSize: number(),
|
||||
routingMaxAge: number(),
|
||||
|
||||
Reference in New Issue
Block a user