@djodjonx/x32-simulator 0.0.5 → 0.0.6

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.6](https://github.com/djodjonx/x32-simulator/compare/v0.0.5...v0.0.6) (2026-01-11)
6
+
7
+
8
+ ### Features
9
+
10
+ * initialize schema with static response defaults ([28ef675](https://github.com/djodjonx/x32-simulator/commit/28ef675ca37fde2fb2d3402dbe2888ce8d21c584))
11
+ * support /node discovery without arguments ([7df0bce](https://github.com/djodjonx/x32-simulator/commit/7df0bcedd5873a31f1982f18a1cbc19b9f3a1d58))
12
+
5
13
  ### [0.0.5](https://github.com/djodjonx/x32-simulator/compare/v0.0.4...v0.0.5) (2026-01-10)
6
14
 
7
15
 
@@ -345,8 +345,7 @@ var NodeDiscoveryStrategy = class {
345
345
  return address === "/node";
346
346
  }
347
347
  execute(msg, _source) {
348
- const queryPath = msg.args[0];
349
- if (!queryPath) return [];
348
+ const queryPath = msg.args[0] || "/";
350
349
  const children = /* @__PURE__ */ new Set();
351
350
  const prefix = queryPath.endsWith("/") ? queryPath : `${queryPath}/`;
352
351
  for (const key of this.schemaRegistry.getAllPaths()) if (key.startsWith(prefix)) {
@@ -619,11 +618,11 @@ var OscMessageHandler = class {
619
618
  this.staticResponseService = staticResponseService;
620
619
  this.strategies = [
621
620
  new NodeDiscoveryStrategy(this.schemaRegistry),
622
- new StaticResponseStrategy(serverIp, serverName, serverModel, this.staticResponseService),
623
621
  new SubscriptionStrategy(subscriptionManager, state, logger),
624
622
  new BatchStrategy(subscriptionManager, logger),
625
623
  new MeterStrategy(subscriptionManager, state, this.meterService),
626
- new StateAccessStrategy(state, logger, this.schemaRegistry)
624
+ new StateAccessStrategy(state, logger, this.schemaRegistry),
625
+ new StaticResponseStrategy(serverIp, serverName, serverModel, this.staticResponseService)
627
626
  ];
628
627
  }
629
628
  /**
@@ -1948,7 +1947,11 @@ var SchemaFactory = class {
1948
1947
  ...this.generateOutputs("rec", 2)
1949
1948
  };
1950
1949
  Object.keys(STATIC_RESPONSES_DATA).forEach((key) => {
1951
- if (key.startsWith("/-") || key.startsWith("/stat")) schema[key] = this.node("i", 0);
1950
+ if (key.startsWith("/-") || key.startsWith("/stat")) {
1951
+ const val = STATIC_RESPONSES_DATA[key][0];
1952
+ const type = typeof val === "string" ? "s" : Number.isInteger(val) ? "i" : "f";
1953
+ schema[key] = this.node(type, val);
1954
+ }
1952
1955
  });
1953
1956
  [
1954
1957
  "/config/routing/IN/1-8",
@@ -374,8 +374,7 @@ var NodeDiscoveryStrategy = class {
374
374
  return address === "/node";
375
375
  }
376
376
  execute(msg, _source) {
377
- const queryPath = msg.args[0];
378
- if (!queryPath) return [];
377
+ const queryPath = msg.args[0] || "/";
379
378
  const children = /* @__PURE__ */ new Set();
380
379
  const prefix = queryPath.endsWith("/") ? queryPath : `${queryPath}/`;
381
380
  for (const key of this.schemaRegistry.getAllPaths()) if (key.startsWith(prefix)) {
@@ -648,11 +647,11 @@ var OscMessageHandler = class {
648
647
  this.staticResponseService = staticResponseService;
649
648
  this.strategies = [
650
649
  new NodeDiscoveryStrategy(this.schemaRegistry),
651
- new StaticResponseStrategy(serverIp, serverName, serverModel, this.staticResponseService),
652
650
  new SubscriptionStrategy(subscriptionManager, state, logger),
653
651
  new BatchStrategy(subscriptionManager, logger),
654
652
  new MeterStrategy(subscriptionManager, state, this.meterService),
655
- new StateAccessStrategy(state, logger, this.schemaRegistry)
653
+ new StateAccessStrategy(state, logger, this.schemaRegistry),
654
+ new StaticResponseStrategy(serverIp, serverName, serverModel, this.staticResponseService)
656
655
  ];
657
656
  }
658
657
  /**
@@ -1977,7 +1976,11 @@ var SchemaFactory = class {
1977
1976
  ...this.generateOutputs("rec", 2)
1978
1977
  };
1979
1978
  Object.keys(STATIC_RESPONSES_DATA).forEach((key) => {
1980
- if (key.startsWith("/-") || key.startsWith("/stat")) schema[key] = this.node("i", 0);
1979
+ if (key.startsWith("/-") || key.startsWith("/stat")) {
1980
+ const val = STATIC_RESPONSES_DATA[key][0];
1981
+ const type = typeof val === "string" ? "s" : Number.isInteger(val) ? "i" : "f";
1982
+ schema[key] = this.node(type, val);
1983
+ }
1981
1984
  });
1982
1985
  [
1983
1986
  "/config/routing/IN/1-8",
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_SchemaRegistry = require('./SchemaRegistry-CfDtw84j.cjs');
1
+ const require_SchemaRegistry = require('./SchemaRegistry-DE6iObDv.cjs');
2
2
 
3
3
  //#region src/domain/models/OscMessage.ts
4
4
  /**
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ConsoleLogger, c as X32Node, d as METER_COUNTS, f as MeterData, i as UdpNetworkGateway, l as X32State, m as LogCategory, n as SchemaFactory, p as SubscriptionManager, r as OscCodec, s as InMemoryStateRepository, t as SchemaRegistry, u as SimulationService } from "./SchemaRegistry-BRVgnyaA.mjs";
1
+ import { a as ConsoleLogger, c as X32Node, d as METER_COUNTS, f as MeterData, i as UdpNetworkGateway, l as X32State, m as LogCategory, n as SchemaFactory, p as SubscriptionManager, r as OscCodec, s as InMemoryStateRepository, t as SchemaRegistry, u as SimulationService } from "./SchemaRegistry-D4eIJord.mjs";
2
2
 
3
3
  //#region src/domain/models/OscMessage.ts
4
4
  /**
package/dist/server.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_SchemaRegistry = require('./SchemaRegistry-CfDtw84j.cjs');
2
+ const require_SchemaRegistry = require('./SchemaRegistry-DE6iObDv.cjs');
3
3
  let node_readline = require("node:readline");
4
4
  node_readline = require_SchemaRegistry.__toESM(node_readline);
5
5
  let node_fs = require("node:fs");
package/dist/server.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as ConsoleLogger, i as UdpNetworkGateway, n as SchemaFactory, o as LogLevel, r as OscCodec, s as InMemoryStateRepository, t as SchemaRegistry, u as SimulationService } from "./SchemaRegistry-BRVgnyaA.mjs";
2
+ import { a as ConsoleLogger, i as UdpNetworkGateway, n as SchemaFactory, o as LogLevel, r as OscCodec, s as InMemoryStateRepository, t as SchemaRegistry, u as SimulationService } from "./SchemaRegistry-D4eIJord.mjs";
3
3
  import * as readline from "node:readline";
4
4
  import * as fs from "node:fs";
5
5
  import * as path from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djodjonx/x32-simulator",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "X32 Simulator",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",