@urun-sh/core 0.2.16 → 0.2.17

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/dist/internal.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __urunCreateRequire } from 'node:module'; const require = globalThis.require ?? __urunCreateRequire(import.meta.url);
2
- import{A as c,B as i,C as f,D as x,E as C,F as l,a as e,b as r,s as o,t,u as a,w as n,x as p,y as s,z as m}from"./chunk-GKS24GDI.mjs";export{e as ChannelMultiplexer,c as DOC_SYNC_WIRE_CONTRACT_VERSION,r as DeferredChannelMultiplexer,x as DeferredDocConnector,n as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,l as createPresence,f as createWebsocketDocConnector,i as deriveYjsServerUrl,a as ensureNodeWebRTC,o as isNodeRuntime,t as nodeMediasoupHandlerName,s as streamDataLabel,p as transportStreamData};
2
+ import{A as s,B as m,C as c,D as i,E as f,F as x,G as C,H as l,a as e,b as r,u as o,v as t,w as a,y as n,z as p}from"./chunk-62CZN6MU.mjs";export{e as ChannelMultiplexer,c as DOC_SYNC_WIRE_CONTRACT_VERSION,r as DeferredChannelMultiplexer,x as DeferredDocConnector,n as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,l as createPresence,f as createWebsocketDocConnector,i as deriveYjsServerUrl,a as ensureNodeWebRTC,o as isNodeRuntime,t as nodeMediasoupHandlerName,s as streamDataLabel,p as transportStreamData};
@@ -67,6 +67,7 @@ declare function createWebsocketDocConnector(opts: WebsocketDocConnectorOptions)
67
67
 
68
68
  declare class DeferredDocConnector {
69
69
  private _target;
70
+
70
71
  private _bridges;
71
72
 
72
73
  readonly connect: DocConnector;
@@ -362,6 +363,14 @@ interface RequestStreamOptions {
362
363
  docSyncTimeout?: number;
363
364
  }
364
365
 
366
+ type SessionEndResult = {
367
+ status: 'ended';
368
+ requestId: string;
369
+ } | {
370
+ status: 'canceled';
371
+ requestId: string;
372
+ };
373
+
365
374
  interface Session {
366
375
 
367
376
  readonly id: string;
@@ -401,6 +410,8 @@ interface Session {
401
410
 
402
411
  onRecovery(hook: () => void): () => void;
403
412
 
413
+ end(): Promise<SessionEndResult>;
414
+
404
415
  disconnect(): void;
405
416
  }
406
417
 
@@ -612,6 +623,8 @@ declare class TransportSession {
612
623
  private _options;
613
624
  private _emitter;
614
625
  private _ws;
626
+
627
+ private _connectedUrl;
615
628
  private _device;
616
629
  private _recvTransport;
617
630
  private _sendTransport;
@@ -704,6 +717,8 @@ declare class TransportSession {
704
717
  get multiplexer(): ChannelMultiplexer | null;
705
718
  get isOpen(): boolean;
706
719
 
720
+ get connectedUrl(): string | null;
721
+
707
722
  getTrackByName(name: string): MediaStreamTrack | undefined;
708
723
  setAuth(options: Pick<TransportSessionOptions, 'orgId' | 'jwt' | 'authProvider'>): void;
709
724
  constructor(options?: TransportSessionOptions);
@@ -917,4 +932,4 @@ interface DataChannelTransport {
917
932
 
918
933
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
919
934
 
920
- export { type TransportSessionOptions as $, type AccessTokenOptions as A, type RuntimeArtifactsAccessor as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type RuntimeAvailability as E, type SceneGraph as F, type Session as G, type SessionDocument as H, SessionDocumentImpl as I, type SessionFailureKind as J, type SessionPhase as K, type Layer as L, type MediaChunkBinding as M, type SessionPhaseError as N, type SessionPhaseName as O, type Presence as P, type SessionStartOptions as Q, type Recording as R, type SceneContext as S, type SessionStatus as T, type SessionStream as U, type SessionText as V, type Store as W, type StoreOptions as X, type StreamChunkOptions as Y, type StreamDataTransport as Z, TransportSession as _, type App as a, type TransportState as a0, createPresence as a1, createWebsocketDocConnector as a2, deriveYjsServerUrl as a3, isPendingRecording as a4, mediaRecorderChunkSource as a5, streamDataLabel as a6, transportStreamData as a7, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredChannelMultiplexer as h, DeferredDocConnector as i, type DocConnection as j, type DocConnector as k, type LayoutConfig as l, type LayoutContext as m, LoopbackStreamData as n, type MediaChunkSource as o, type MediaChunkSourceFactory as p, type MediaRecorderChunkSourceOptions as q, type PresenceState as r, type RecordingBucket as s, type RecordingLifecycle as t, type RecordingStatus as u, type RecordingsAccessor as v, type RequestOptions as w, type RequestStreamOptions as x, type RuntimeArtifact as y, type RuntimeArtifactDownload as z };
935
+ export { TransportSession as $, type AccessTokenOptions as A, type RuntimeArtifactsAccessor as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type RuntimeAvailability as E, type SceneGraph as F, type Session as G, type SessionDocument as H, SessionDocumentImpl as I, type SessionEndResult as J, type SessionFailureKind as K, type Layer as L, type MediaChunkBinding as M, type SessionPhase as N, type SessionPhaseError as O, type Presence as P, type SessionPhaseName as Q, type Recording as R, type SceneContext as S, type SessionStartOptions as T, type SessionStatus as U, type SessionStream as V, type SessionText as W, type Store as X, type StoreOptions as Y, type StreamChunkOptions as Z, type StreamDataTransport as _, type App as a, type TransportSessionOptions as a0, type TransportState as a1, createPresence as a2, createWebsocketDocConnector as a3, deriveYjsServerUrl as a4, isPendingRecording as a5, mediaRecorderChunkSource as a6, streamDataLabel as a7, transportStreamData as a8, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredChannelMultiplexer as h, DeferredDocConnector as i, type DocConnection as j, type DocConnector as k, type LayoutConfig as l, type LayoutContext as m, LoopbackStreamData as n, type MediaChunkSource as o, type MediaChunkSourceFactory as p, type MediaRecorderChunkSourceOptions as q, type PresenceState as r, type RecordingBucket as s, type RecordingLifecycle as t, type RecordingStatus as u, type RecordingsAccessor as v, type RequestOptions as w, type RequestStreamOptions as x, type RuntimeArtifact as y, type RuntimeArtifactDownload as z };
@@ -67,6 +67,7 @@ declare function createWebsocketDocConnector(opts: WebsocketDocConnectorOptions)
67
67
 
68
68
  declare class DeferredDocConnector {
69
69
  private _target;
70
+
70
71
  private _bridges;
71
72
 
72
73
  readonly connect: DocConnector;
@@ -362,6 +363,14 @@ interface RequestStreamOptions {
362
363
  docSyncTimeout?: number;
363
364
  }
364
365
 
366
+ type SessionEndResult = {
367
+ status: 'ended';
368
+ requestId: string;
369
+ } | {
370
+ status: 'canceled';
371
+ requestId: string;
372
+ };
373
+
365
374
  interface Session {
366
375
 
367
376
  readonly id: string;
@@ -401,6 +410,8 @@ interface Session {
401
410
 
402
411
  onRecovery(hook: () => void): () => void;
403
412
 
413
+ end(): Promise<SessionEndResult>;
414
+
404
415
  disconnect(): void;
405
416
  }
406
417
 
@@ -612,6 +623,8 @@ declare class TransportSession {
612
623
  private _options;
613
624
  private _emitter;
614
625
  private _ws;
626
+
627
+ private _connectedUrl;
615
628
  private _device;
616
629
  private _recvTransport;
617
630
  private _sendTransport;
@@ -704,6 +717,8 @@ declare class TransportSession {
704
717
  get multiplexer(): ChannelMultiplexer | null;
705
718
  get isOpen(): boolean;
706
719
 
720
+ get connectedUrl(): string | null;
721
+
707
722
  getTrackByName(name: string): MediaStreamTrack | undefined;
708
723
  setAuth(options: Pick<TransportSessionOptions, 'orgId' | 'jwt' | 'authProvider'>): void;
709
724
  constructor(options?: TransportSessionOptions);
@@ -917,4 +932,4 @@ interface DataChannelTransport {
917
932
 
918
933
  declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
919
934
 
920
- export { type TransportSessionOptions as $, type AccessTokenOptions as A, type RuntimeArtifactsAccessor as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type RuntimeAvailability as E, type SceneGraph as F, type Session as G, type SessionDocument as H, SessionDocumentImpl as I, type SessionFailureKind as J, type SessionPhase as K, type Layer as L, type MediaChunkBinding as M, type SessionPhaseError as N, type SessionPhaseName as O, type Presence as P, type SessionStartOptions as Q, type Recording as R, type SceneContext as S, type SessionStatus as T, type SessionStream as U, type SessionText as V, type Store as W, type StoreOptions as X, type StreamChunkOptions as Y, type StreamDataTransport as Z, TransportSession as _, type App as a, type TransportState as a0, createPresence as a1, createWebsocketDocConnector as a2, deriveYjsServerUrl as a3, isPendingRecording as a4, mediaRecorderChunkSource as a5, streamDataLabel as a6, transportStreamData as a7, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredChannelMultiplexer as h, DeferredDocConnector as i, type DocConnection as j, type DocConnector as k, type LayoutConfig as l, type LayoutContext as m, LoopbackStreamData as n, type MediaChunkSource as o, type MediaChunkSourceFactory as p, type MediaRecorderChunkSourceOptions as q, type PresenceState as r, type RecordingBucket as s, type RecordingLifecycle as t, type RecordingStatus as u, type RecordingsAccessor as v, type RequestOptions as w, type RequestStreamOptions as x, type RuntimeArtifact as y, type RuntimeArtifactDownload as z };
935
+ export { TransportSession as $, type AccessTokenOptions as A, type RuntimeArtifactsAccessor as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type RuntimeAvailability as E, type SceneGraph as F, type Session as G, type SessionDocument as H, SessionDocumentImpl as I, type SessionEndResult as J, type SessionFailureKind as K, type Layer as L, type MediaChunkBinding as M, type SessionPhase as N, type SessionPhaseError as O, type Presence as P, type SessionPhaseName as Q, type Recording as R, type SceneContext as S, type SessionStartOptions as T, type SessionStatus as U, type SessionStream as V, type SessionText as W, type Store as X, type StoreOptions as Y, type StreamChunkOptions as Z, type StreamDataTransport as _, type App as a, type TransportSessionOptions as a0, type TransportState as a1, createPresence as a2, createWebsocketDocConnector as a3, deriveYjsServerUrl as a4, isPendingRecording as a5, mediaRecorderChunkSource as a6, streamDataLabel as a7, transportStreamData as a8, type AppOptions as b, type AttachOptions as c, type ChannelMessage as d, ChannelMultiplexer as e, type ChannelName as f, type ChunkReadable as g, DeferredChannelMultiplexer as h, DeferredDocConnector as i, type DocConnection as j, type DocConnector as k, type LayoutConfig as l, type LayoutContext as m, LoopbackStreamData as n, type MediaChunkSource as o, type MediaChunkSourceFactory as p, type MediaRecorderChunkSourceOptions as q, type PresenceState as r, type RecordingBucket as s, type RecordingLifecycle as t, type RecordingStatus as u, type RecordingsAccessor as v, type RequestOptions as w, type RequestStreamOptions as x, type RuntimeArtifact as y, type RuntimeArtifactDownload as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/core",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Core transport and channel primitives for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",