@omniviewdev/runtime 0.27.0 → 0.27.2

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.
@@ -0,0 +1,12 @@
1
+ type LogEventHandlers = {
2
+ onLines: (data: unknown) => void;
3
+ onEvent: (data: unknown) => void;
4
+ };
5
+ /** Capture output during creation; expire unclaimed output only after successful settlement. */
6
+ export declare function PrepareSessionEvents(sessionId: string): {
7
+ release: () => void;
8
+ settled: () => void;
9
+ };
10
+ /** Subscribe to an SDK session and adopt any output captured during creation. */
11
+ export declare function SubscribeSessionEvents(sessionId: string, handlers: LogEventHandlers): () => void;
12
+ export {};
package/dist/logs.d.ts CHANGED
@@ -1,9 +1,12 @@
1
1
  import { CancellablePromise } from '@wailsio/runtime';
2
2
  import { LogSession, LogSessionOptions } from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models';
3
3
  import { Value, ResourceReference, AccessRoute } from './resource/v2/domain';
4
+ export { SubscribeSessionEvents } from './logSessionEvents';
4
5
  export { CloseSession, GetSession, GetSupportedResources, HasPlugin, ListPlugins, ListSessions, SendCommand, UpdateSessionOptions, } from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper';
5
6
  /** Canonical input to the encoded JSON bridge; resource bodies are never native JSON projections. */
6
7
  export interface LogSessionRequest {
8
+ /** Optional correlation ID for subscribing before session creation. Not an authority token. */
9
+ session_id?: string;
7
10
  resource_key: string;
8
11
  resource_id: string;
9
12
  resource_data?: Value;
package/dist/runtime.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BVi9X4oU.cjs"),d=require("./events-DnLqUWri.cjs"),A=require("./calls-B-HP1Icv.cjs"),w=n.newRuntimeCaller(n.objectNames.Application),_=0,M=1,C=2;function j(){return w(_)}function O(){return w(M)}function W(){return w(C)}const T=Object.freeze(Object.defineProperty({__proto__:null,Hide:j,Quit:W,Show:O},Symbol.toStringTag,{value:"Module"})),p=n.newRuntimeCaller(n.objectNames.Clipboard),D=0,E=1;function R(t){return p(D,{text:t})}function L(){return p(E)}const x=Object.freeze(Object.defineProperty({__proto__:null,SetText:R,Text:L},Symbol.toStringTag,{value:"Module"}));n.hasDOM&&(window._wails=window._wails||{});const P=n.newRuntimeCaller(n.objectNames.Dialog),I=0,B=1,G=2,k=3,q=4,z=5;function s(t,e={}){return P(t,e)}function F(t){return s(I,t)}function $(t){return s(B,t)}function Q(t){return s(G,t)}function y(t){return s(k,t)}function N(t){var e;return(e=s(q,t))!==null&&e!==void 0?e:[]}function Y(t){return s(z,t)}const H=Object.freeze(Object.defineProperty({__proto__:null,Error:Q,Info:F,OpenFile:N,Question:y,SaveFile:Y,Warning:$},Symbol.toStringTag,{value:"Module"})),u=n.newRuntimeCaller(n.objectNames.Screens),U=0,J=1,K=2,V=3,X=4;function Z(){return u(U)}function tt(){return u(J)}function et(){return u(K)}function nt(t){return u(V,{id:t})}function ot(t){return u(X,{index:t})}const rt=Object.freeze(Object.defineProperty({__proto__:null,GetAll:Z,GetByID:nt,GetByIndex:ot,GetCurrent:et,GetPrimary:tt},Symbol.toStringTag,{value:"Module"}));function it(t,e=null){d.Emit(t,e)}function lt(t,e){const o=n.thisWindow.Get(t),r=o[e];if(typeof r!="function"){console.error(`Window method '${e}' not found`);return}try{r.call(o)}catch(i){console.error(`Error calling window method '${e}': `,i)}}function h(t){const e=t.currentTarget;function o(i="Yes"){if(i!=="Yes")return;const a=e.getAttribute("wml-event")||e.getAttribute("data-wml-event"),f=e.getAttribute("wml-target-window")||e.getAttribute("data-wml-target-window")||"",b=e.getAttribute("wml-window")||e.getAttribute("data-wml-window"),m=e.getAttribute("wml-openurl")||e.getAttribute("data-wml-openurl");a!==null&&it(a),b!==null&&lt(f,b),m!==null&&d.OpenURL(m)}const r=e.getAttribute("wml-confirm")||e.getAttribute("data-wml-confirm");r?y({Title:"Confirm",Message:r,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(o):o()}const g=Symbol("controller"),c=Symbol("triggerMap"),l=Symbol("elementCount");class st{constructor(){this[g]=new AbortController}set(e,o){return{signal:this[g].signal}}reset(){this[g].abort(),this[g]=new AbortController}}class ct{constructor(){this[c]=new WeakMap,this[l]=0}set(e,o){return this[c].has(e)||this[l]++,this[c].set(e,o),{}}reset(){if(!(this[l]<=0)){for(const e of document.body.querySelectorAll("*")){if(this[l]<=0)break;const o=this[c].get(e);o!=null&&this[l]--;for(const r of o||[])e.removeEventListener(r,h)}this[c]=new WeakMap,this[l]=0}}}const S=n.canAbortListeners()?new st:new ct;function ut(t){const e=/\S+/g,o=t.getAttribute("wml-trigger")||t.getAttribute("data-wml-trigger")||"click",r=[];let i;for(;(i=e.exec(o))!==null;)r.push(i[0]);const a=S.set(t,r);for(const f of r)t.addEventListener(f,h,a)}function at(){n.whenReady(v)}function v(){S.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut)}const gt=Object.freeze(Object.defineProperty({__proto__:null,Enable:at,Reload:v},Symbol.toStringTag,{value:"Module"}));exports.Flags=n.flags;exports.System=n.system;exports.Window=n.thisWindow;exports.Browser=d.browser;exports.Events=d.events;exports.Call=A.calls;exports.Application=T;exports.Clipboard=x;exports.Dialogs=H;exports.Screens=rt;exports.WML=gt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BVi9X4oU.cjs"),p=require("./browser-VYZDuy8Z.cjs"),f=require("./events-B9wlH6cT.cjs"),w=n.newRuntimeCaller(n.objectNames.Application),_=0,M=1,C=2;function j(){return w(_)}function O(){return w(M)}function W(){return w(C)}const T=Object.freeze(Object.defineProperty({__proto__:null,Hide:j,Quit:W,Show:O},Symbol.toStringTag,{value:"Module"})),y=n.newRuntimeCaller(n.objectNames.Clipboard),D=0,E=1;function R(t){return y(D,{text:t})}function L(){return y(E)}const x=Object.freeze(Object.defineProperty({__proto__:null,SetText:R,Text:L},Symbol.toStringTag,{value:"Module"}));n.hasDOM&&(window._wails=window._wails||{});const P=n.newRuntimeCaller(n.objectNames.Dialog),I=0,B=1,G=2,k=3,q=4,z=5;function s(t,e={}){return P(t,e)}function F(t){return s(I,t)}function $(t){return s(B,t)}function Q(t){return s(G,t)}function h(t){return s(k,t)}function N(t){var e;return(e=s(q,t))!==null&&e!==void 0?e:[]}function Y(t){return s(z,t)}const H=Object.freeze(Object.defineProperty({__proto__:null,Error:Q,Info:F,OpenFile:N,Question:h,SaveFile:Y,Warning:$},Symbol.toStringTag,{value:"Module"})),u=n.newRuntimeCaller(n.objectNames.Screens),U=0,J=1,K=2,V=3,X=4;function Z(){return u(U)}function tt(){return u(J)}function et(){return u(K)}function nt(t){return u(V,{id:t})}function ot(t){return u(X,{index:t})}const rt=Object.freeze(Object.defineProperty({__proto__:null,GetAll:Z,GetByID:nt,GetByIndex:ot,GetCurrent:et,GetPrimary:tt},Symbol.toStringTag,{value:"Module"}));function it(t,e=null){f.Emit(t,e)}function lt(t,e){const o=n.thisWindow.Get(t),r=o[e];if(typeof r!="function"){console.error(`Window method '${e}' not found`);return}try{r.call(o)}catch(i){console.error(`Error calling window method '${e}': `,i)}}function S(t){const e=t.currentTarget;function o(i="Yes"){if(i!=="Yes")return;const a=e.getAttribute("wml-event")||e.getAttribute("data-wml-event"),d=e.getAttribute("wml-target-window")||e.getAttribute("data-wml-target-window")||"",b=e.getAttribute("wml-window")||e.getAttribute("data-wml-window"),m=e.getAttribute("wml-openurl")||e.getAttribute("data-wml-openurl");a!==null&&it(a),b!==null&&lt(d,b),m!==null&&p.OpenURL(m)}const r=e.getAttribute("wml-confirm")||e.getAttribute("data-wml-confirm");r?h({Title:"Confirm",Message:r,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(o):o()}const g=Symbol("controller"),c=Symbol("triggerMap"),l=Symbol("elementCount");class st{constructor(){this[g]=new AbortController}set(e,o){return{signal:this[g].signal}}reset(){this[g].abort(),this[g]=new AbortController}}class ct{constructor(){this[c]=new WeakMap,this[l]=0}set(e,o){return this[c].has(e)||this[l]++,this[c].set(e,o),{}}reset(){if(!(this[l]<=0)){for(const e of document.body.querySelectorAll("*")){if(this[l]<=0)break;const o=this[c].get(e);o!=null&&this[l]--;for(const r of o||[])e.removeEventListener(r,S)}this[c]=new WeakMap,this[l]=0}}}const v=n.canAbortListeners()?new st:new ct;function ut(t){const e=/\S+/g,o=t.getAttribute("wml-trigger")||t.getAttribute("data-wml-trigger")||"click",r=[];let i;for(;(i=e.exec(o))!==null;)r.push(i[0]);const a=v.set(t,r);for(const d of r)t.addEventListener(d,S,a)}function at(){n.whenReady(A)}function A(){v.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut)}const gt=Object.freeze(Object.defineProperty({__proto__:null,Enable:at,Reload:A},Symbol.toStringTag,{value:"Module"}));exports.Flags=n.flags;exports.System=n.system;exports.Window=n.thisWindow;exports.Browser=p.browser;exports.Call=f.calls;exports.Events=f.events;exports.Application=T;exports.Clipboard=x;exports.Dialogs=H;exports.Screens=rt;exports.WML=gt;
package/dist/runtime.js CHANGED
@@ -1,8 +1,9 @@
1
- import { n as g, o as f, h as _, w as v, c as M, t as C } from "./index-zyAgCXOO.js";
2
- import { f as At, s as _t } from "./index-zyAgCXOO.js";
3
- import { a as O, E as W } from "./events-uBheGmqm.js";
4
- import { b as Mt, e as Ct } from "./events-uBheGmqm.js";
5
- import { c as Wt } from "./calls-DYGtxNJ6.js";
1
+ import { n as g, o as f, h as _, w as v, c as M, t as O } from "./index-zyAgCXOO.js";
2
+ import { f as _t, s as vt } from "./index-zyAgCXOO.js";
3
+ import { O as C } from "./browser-9YF5mP93.js";
4
+ import { b as Ot } from "./browser-9YF5mP93.js";
5
+ import { E as W } from "./events-CgnLM6iV.js";
6
+ import { c as Wt, e as Dt } from "./events-CgnLM6iV.js";
6
7
  const w = g(f.Application), D = 0, E = 1, T = 2;
7
8
  function x() {
8
9
  return w(D);
@@ -13,7 +14,7 @@ function j() {
13
14
  function L() {
14
15
  return w(T);
15
16
  }
16
- const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17
+ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17
18
  __proto__: null,
18
19
  Hide: x,
19
20
  Quit: L,
@@ -25,7 +26,7 @@ function P(t) {
25
26
  function B() {
26
27
  return p(I);
27
28
  }
28
- const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
+ const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
30
  __proto__: null,
30
31
  SetText: P,
31
32
  Text: B
@@ -54,7 +55,7 @@ function J(t) {
54
55
  function K(t) {
55
56
  return l(Y, t);
56
57
  }
57
- const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
59
  __proto__: null,
59
60
  Error: U,
60
61
  Info: q,
@@ -78,7 +79,7 @@ function rt(t) {
78
79
  function it(t) {
79
80
  return c(tt, { index: t });
80
81
  }
81
- const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
+ const ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
83
  __proto__: null,
83
84
  GetAll: et,
84
85
  GetByID: rt,
@@ -90,7 +91,7 @@ function lt(t, e = null) {
90
91
  W(t, e);
91
92
  }
92
93
  function st(t, e) {
93
- const n = C.Get(t), o = n[e];
94
+ const n = O.Get(t), o = n[e];
94
95
  if (typeof o != "function") {
95
96
  console.error(`Window method '${e}' not found`);
96
97
  return;
@@ -107,7 +108,7 @@ function y(t) {
107
108
  if (r !== "Yes")
108
109
  return;
109
110
  const a = e.getAttribute("wml-event") || e.getAttribute("data-wml-event"), d = e.getAttribute("wml-target-window") || e.getAttribute("data-wml-target-window") || "", m = e.getAttribute("wml-window") || e.getAttribute("data-wml-window"), b = e.getAttribute("wml-openurl") || e.getAttribute("data-wml-openurl");
110
- a !== null && lt(a), m !== null && st(d, m), b !== null && O(b);
111
+ a !== null && lt(a), m !== null && st(d, m), b !== null && C(b);
111
112
  }
112
113
  const o = e.getAttribute("wml-confirm") || e.getAttribute("data-wml-confirm");
113
114
  o ? h({
@@ -188,21 +189,21 @@ function gt() {
188
189
  function A() {
189
190
  S.reset(), document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut);
190
191
  }
191
- const ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
192
+ const yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
192
193
  __proto__: null,
193
194
  Enable: gt,
194
195
  Reload: A
195
196
  }, Symbol.toStringTag, { value: "Module" }));
196
197
  export {
197
- wt as Application,
198
- Mt as Browser,
198
+ mt as Application,
199
+ Ot as Browser,
199
200
  Wt as Call,
200
- mt as Clipboard,
201
- bt as Dialogs,
202
- Ct as Events,
203
- At as Flags,
204
- pt as Screens,
205
- _t as System,
206
- ht as WML,
207
- C as Window
201
+ bt as Clipboard,
202
+ pt as Dialogs,
203
+ Dt as Events,
204
+ _t as Flags,
205
+ ht as Screens,
206
+ vt as System,
207
+ yt as WML,
208
+ O as Window
208
209
  };