@qontinui/ui-bridge-wrapper 0.15.0 → 0.15.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/README.md CHANGED
@@ -55,6 +55,7 @@ const transport = createTransport({
55
55
  kind: 'live',
56
56
  runnerUrl: 'ws://127.0.0.1:9876/ui-bridge/ws',
57
57
  appId: 'my-app',
58
+ appName: 'My app', // optional; defaults to appId (the runner requires both)
58
59
  options: { webSocketCtor: WebSocket, screenshotPage: page },
59
60
  });
60
61
  await transport.ready();
@@ -881,6 +881,12 @@ var LiveSessionTransport = class extends BaseTransport {
881
881
  if (!config.runnerUrl) {
882
882
  throw new WrapperTransportError("INVALID_CONFIG", `Transport kind 'live' requires runnerUrl`);
883
883
  }
884
+ if (!config.appId?.trim()) {
885
+ throw new WrapperTransportError(
886
+ "INVALID_CONFIG",
887
+ `Transport kind 'live' requires a non-blank appId (the runner refuses a register frame without one)`
888
+ );
889
+ }
884
890
  this.url = config.runnerUrl;
885
891
  this.appId = config.appId;
886
892
  this.appName = config.appName;
@@ -919,7 +925,8 @@ var LiveSessionTransport = class extends BaseTransport {
919
925
  type: "register",
920
926
  transport: "websocket",
921
927
  appId: this.appId,
922
- appName: this.appName,
928
+ // appName defaults to appId: the runner requires a non-blank one.
929
+ appName: this.appName?.trim() || this.appId,
923
930
  appType: this.opts.appType ?? "wrapper"
924
931
  };
925
932
  if (this.opts.framework !== void 0) frame.framework = this.opts.framework;