Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Update heartwood and schemas
Sebastian Martinez committed 2 years ago
commit f18b91d669e0743f3a3b8d9f1477c3146a7dac76
parent bd4e56956e651463b4effb0ede12f16df4eb5613
6 files changed +10 -8
modified httpd-client/index.ts
@@ -76,6 +76,7 @@ export type Node = z.infer<typeof nodeSchema>;

const nodeSchema = object({
  id: string(),
+
  version: string(),
  config: object({
    alias: string(),
    peers: union([
@@ -91,6 +92,8 @@ const nodeSchema = object({
      routingMaxSize: number(),
      routingMaxAge: number(),
      fetchConcurrency: number(),
+
      gossipMaxAge: number(),
+
      maxOpenFiles: number(),
      rate: object({
        inbound: object({
          fillRate: number(),
@@ -114,7 +117,7 @@ const nodeInfoSchema = object({
  message: string(),
  service: string(),
  version: string(),
-
  node: nodeSchema.pick({ id: true }),
+
  nid: string(),
  path: string(),
  links: array(
    object({
modified httpd-client/tests/support/httpd.ts
@@ -11,7 +11,6 @@ export async function authenticate(
    "http://localhost:3001",
    "--no-open",
    "--connect",
-
    "--listen",
    `${peer.httpdBaseUrl.hostname}:${peer.httpdBaseUrl.port}`,
  ]);
  const match = stdout.match(/Visit (http:\/\/\S+) to connect/);
modified src/views/nodes/router.ts
@@ -94,8 +94,7 @@ export async function loadNodeRoute(
  const api = new HttpdClient(params.baseUrl);
  try {
    const projectPageIndex = 0;
-
    const [nodeInfo, node, { projects, total }] = await Promise.all([
-
      api.getNodeInfo(),
+
    const [node, { projects, total }] = await Promise.all([
      api.getNode(),
      loadProjects(projectPageIndex, params.baseUrl),
    ]);
@@ -104,9 +103,9 @@ export async function loadNodeRoute(
      params: {
        projectPageIndex: projectPageIndex + 1,
        baseUrl: params.baseUrl,
-
        nid: nodeInfo.node.id,
+
        nid: node.id,
        externalAddresses: node.config?.externalAddresses ?? [],
-
        version: nodeInfo.version,
+
        version: node.version,
        projects: projects,
        projectCount: total,
      },
modified tests/support/fixtures.ts
@@ -152,7 +152,6 @@ export const test = base.extend<{
      "http://localhost:3001",
      "--no-open",
      "--connect",
-
      "--listen",
      `${peer.httpdBaseUrl.hostname}:${peer.httpdBaseUrl.port}`,
    ]);
    const match = stdout.match(/Visit (http:\/\/\S+) to connect/);
modified tests/support/heartwood-version
@@ -1 +1 @@
-
6bc7d297a5e7e3feecec3f61327a9adbdf532f61

\ No newline at end of file
+
5dbd9bb2a32dca6aafbd2b4a50dd73d237ca025d

\ No newline at end of file
modified tests/support/peerManager.ts
@@ -136,6 +136,7 @@ export const NodeConfigSchema = object({
      routingMaxAge: number(),
      fetchConcurrency: number(),
      gossipMaxAge: number(),
+
      maxOpenFiles: number(),
      rate: object({
        inbound: object({ fillRate: number(), capacity: number() }),
        outbound: object({ fillRate: number(), capacity: number() }),
@@ -307,6 +308,7 @@ export class RadiclePeer {
        routingMaxAge: 604800,
        fetchConcurrency: 1,
        gossipMaxAge: 1209600,
+
        maxOpenFiles: 4096,
        rate: {
          inbound: { fillRate: 0.2, capacity: 32 },
          outbound: { fillRate: 1.0, capacity: 64 },