Skip to content
This repository was archived by the owner on Jul 23, 2026. It is now read-only.

Commit 57381cd

Browse files
AllanOricilclaude
andcommitted
feat: upgrade to @bonsae/nrg 0.13.0 and use schema-driven ports
Remove explicit inputs/outputs declarations — port count is now derived from inputSchema and outputsSchema presence. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 50e314a commit 57381cd

8 files changed

Lines changed: 22 additions & 33 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@
5959
"vue": "^3.5.14"
6060
},
6161
"dependencies": {
62-
"@bonsae/nrg": "^0.11.0"
62+
"@bonsae/nrg": "^0.13.0"
6363
}
6464
}

pnpm-lock.yaml

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/server/nodes/auto-wired-node.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ export default class AutoWiredNode extends IONode<
2121
public static override readonly type: string = "auto-wired-node";
2222
public static override readonly category: string = "network";
2323
public static override readonly color: `#${string}` = "#7fc7ff";
24-
public static override readonly inputs: number = 1;
25-
public static override readonly outputs: number = 1;
26-
2724
public static override readonly configSchema: Schema = ConfigsSchema;
2825
public static override readonly credentialsSchema: Schema = CredentialsSchema;
2926
public static override readonly inputSchema: Schema = InputSchema;

src/server/nodes/dynamic-outputs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Schema, Infer } from "@bonsae/nrg/server";
2-
import { IONode } from "@bonsae/nrg/server";
2+
import { IONode, SchemaType } from "@bonsae/nrg/server";
33
import { ConfigsSchema } from "../schemas/dynamic-outputs";
44

55
export type Config = Infer<typeof ConfigsSchema>;
@@ -8,10 +8,10 @@ export default class DynamicOutputs extends IONode<Config> {
88
public static override readonly type: string = "dynamic-outputs";
99
public static override readonly category: string = "function";
1010
public static override readonly color: `#${string}` = "#e2d96e";
11-
public static override readonly inputs: number = 1;
12-
public static override readonly outputs: number = 1;
1311

1412
public static override readonly configSchema: Schema = ConfigsSchema;
13+
public static override readonly inputSchema: Schema = SchemaType.Object({});
14+
public static override readonly outputsSchema: Schema = SchemaType.Object({});
1515

1616
public override async input(msg: any): Promise<void> {
1717
const outputCount = this.config.outputs;

src/server/nodes/http-request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Schema, Infer } from "@bonsae/nrg/server";
2-
import { IONode } from "@bonsae/nrg/server";
2+
import { IONode, SchemaType } from "@bonsae/nrg/server";
33
import { ConfigsSchema } from "../schemas/http-request";
44

55
export type Config = Infer<typeof ConfigsSchema>;
@@ -8,10 +8,10 @@ export default class HttpRequest extends IONode<Config> {
88
public static override readonly type: string = "http-request-custom";
99
public static override readonly category: string = "network";
1010
public static override readonly color: `#${string}` = "#e8d44d";
11-
public static override readonly inputs: number = 1;
12-
public static override readonly outputs: number = 1;
1311

1412
public static override readonly configSchema: Schema = ConfigsSchema;
13+
public static override readonly inputSchema: Schema = SchemaType.Object({});
14+
public static override readonly outputsSchema: Schema = SchemaType.Object({});
1515

1616
public override async input(msg: any): Promise<void> {
1717
this.log(`${this.config.method} ${this.config.url}`);

src/server/nodes/my-subscriber.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ export default defineIONode({
55
type: "my-subscriber",
66
category: "network",
77
color: "#d8bfd8",
8-
inputs: 0,
9-
outputs: 1,
108
configSchema: ConfigsSchema,
119
outputsSchema: OutputSchema,
1210

src/server/nodes/splitter.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ export default class Splitter extends IONode<Config, any, Input, Output> {
1818
public static override readonly type: string = "splitter";
1919
public static override readonly category: string = "function";
2020
public static override readonly color: `#${string}` = "#c2e5a0";
21-
public static override readonly inputs: number = 1;
22-
public static override readonly outputs: number = 2;
23-
2421
public static override readonly configSchema: Schema = ConfigsSchema;
2522
public static override readonly inputSchema: Schema = InputSchema;
2623
public static override readonly outputsSchema: Schema[] = [

src/server/nodes/your-node.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ export default class YourNode extends IONode<
2323
public static override readonly type: string = "your-node";
2424
public static override readonly category: string = "function";
2525
public static override readonly color: `#${string}` = "#ffffff";
26-
public static override readonly inputs: number = 1;
27-
public static override readonly outputs: number = 1;
28-
2926
public static override readonly configSchema: Schema = ConfigsSchema;
3027
public static override readonly credentialsSchema: Schema = CredentialsSchema;
3128
public static override readonly inputSchema: Schema = InputSchema;

0 commit comments

Comments
 (0)