@urun-sh/core 0.2.16 → 0.2.18
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 +4 -0
- package/dist/{chunk-GKS24GDI.mjs → chunk-62CZN6MU.mjs} +5 -5
- package/dist/{chunk-AEIZ6XUT.mjs → chunk-UNVRVZHL.mjs} +2 -2
- package/dist/index.browser.d.mts +155 -3
- package/dist/index.browser.d.ts +155 -3
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +155 -3
- package/dist/index.d.ts +155 -3
- package/dist/index.js +5 -5
- package/dist/index.mjs +1 -1
- package/dist/internal.browser.d.mts +1 -1
- package/dist/internal.browser.d.ts +1 -1
- package/dist/internal.browser.js +1 -1
- package/dist/internal.browser.mjs +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/{stream-data-D8AOc7CR.d.mts → stream-data-ChMs2mq2.d.mts} +35 -1
- package/dist/{stream-data-D8AOc7CR.d.ts → stream-data-ChMs2mq2.d.ts} +35 -1
- package/package.json +1 -1
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
|
|
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;
|
|
@@ -118,6 +119,19 @@ interface SessionPhaseError {
|
|
|
118
119
|
httpStatus?: number;
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
type ActivationState = 'activating' | 'still-activating' | 'cold-boot' | 'degraded' | 'first-media';
|
|
123
|
+
|
|
124
|
+
interface ActivationEvent {
|
|
125
|
+
|
|
126
|
+
state: ActivationState;
|
|
127
|
+
|
|
128
|
+
elapsedMs: number;
|
|
129
|
+
|
|
130
|
+
hint?: string;
|
|
131
|
+
|
|
132
|
+
stream?: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
121
135
|
interface SessionPhase {
|
|
122
136
|
|
|
123
137
|
name: SessionPhaseName;
|
|
@@ -362,6 +376,14 @@ interface RequestStreamOptions {
|
|
|
362
376
|
docSyncTimeout?: number;
|
|
363
377
|
}
|
|
364
378
|
|
|
379
|
+
type SessionEndResult = {
|
|
380
|
+
status: 'ended';
|
|
381
|
+
requestId: string;
|
|
382
|
+
} | {
|
|
383
|
+
status: 'canceled';
|
|
384
|
+
requestId: string;
|
|
385
|
+
};
|
|
386
|
+
|
|
365
387
|
interface Session {
|
|
366
388
|
|
|
367
389
|
readonly id: string;
|
|
@@ -376,6 +398,8 @@ interface Session {
|
|
|
376
398
|
|
|
377
399
|
doc(key: string): SessionDocument;
|
|
378
400
|
|
|
401
|
+
readonly mediaTransport: 'webtransport' | 'webrtc' | null;
|
|
402
|
+
|
|
379
403
|
readonly presence: Presence;
|
|
380
404
|
|
|
381
405
|
touch(): void;
|
|
@@ -388,6 +412,8 @@ interface Session {
|
|
|
388
412
|
|
|
389
413
|
onPhase(handler: (phase: SessionPhase) => void): () => void;
|
|
390
414
|
|
|
415
|
+
onActivation?(handler: (event: ActivationEvent) => void): () => void;
|
|
416
|
+
|
|
391
417
|
whenLive(options?: {
|
|
392
418
|
timeout?: number;
|
|
393
419
|
signal?: AbortSignal;
|
|
@@ -401,6 +427,8 @@ interface Session {
|
|
|
401
427
|
|
|
402
428
|
onRecovery(hook: () => void): () => void;
|
|
403
429
|
|
|
430
|
+
end(): Promise<SessionEndResult>;
|
|
431
|
+
|
|
404
432
|
disconnect(): void;
|
|
405
433
|
}
|
|
406
434
|
|
|
@@ -500,6 +528,8 @@ interface AppOptions {
|
|
|
500
528
|
authProvider?: string;
|
|
501
529
|
|
|
502
530
|
functionsUrl?: string;
|
|
531
|
+
|
|
532
|
+
allowWebTransport?: boolean;
|
|
503
533
|
}
|
|
504
534
|
interface AccessTokenOptions {
|
|
505
535
|
forceRefresh?: boolean;
|
|
@@ -612,6 +642,8 @@ declare class TransportSession {
|
|
|
612
642
|
private _options;
|
|
613
643
|
private _emitter;
|
|
614
644
|
private _ws;
|
|
645
|
+
|
|
646
|
+
private _connectedUrl;
|
|
615
647
|
private _device;
|
|
616
648
|
private _recvTransport;
|
|
617
649
|
private _sendTransport;
|
|
@@ -704,6 +736,8 @@ declare class TransportSession {
|
|
|
704
736
|
get multiplexer(): ChannelMultiplexer | null;
|
|
705
737
|
get isOpen(): boolean;
|
|
706
738
|
|
|
739
|
+
get connectedUrl(): string | null;
|
|
740
|
+
|
|
707
741
|
getTrackByName(name: string): MediaStreamTrack | undefined;
|
|
708
742
|
setAuth(options: Pick<TransportSessionOptions, 'orgId' | 'jwt' | 'authProvider'>): void;
|
|
709
743
|
constructor(options?: TransportSessionOptions);
|
|
@@ -917,4 +951,4 @@ interface DataChannelTransport {
|
|
|
917
951
|
|
|
918
952
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
919
953
|
|
|
920
|
-
export { type
|
|
954
|
+
export { type StreamChunkOptions as $, type AccessTokenOptions as A, type RuntimeArtifact as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type RuntimeArtifactDownload as E, type RuntimeArtifactsAccessor as F, type RuntimeAvailability as G, type SceneGraph as H, type Session as I, type SessionDocument as J, SessionDocumentImpl as K, type Layer as L, type MediaChunkBinding as M, type SessionEndResult as N, type SessionFailureKind as O, type Presence as P, type SessionPhase as Q, type Recording as R, type SceneContext as S, type SessionPhaseError as T, type SessionPhaseName as U, type SessionStartOptions as V, type SessionStatus as W, type SessionStream as X, type SessionText as Y, type Store as Z, type StoreOptions as _, type ActivationEvent as a, type StreamDataTransport as a0, TransportSession as a1, type TransportSessionOptions as a2, type TransportState as a3, createPresence as a4, createWebsocketDocConnector as a5, deriveYjsServerUrl as a6, isPendingRecording as a7, mediaRecorderChunkSource as a8, streamDataLabel as a9, transportStreamData as aa, type ActivationState as b, type App as c, type AppOptions as d, type AttachOptions as e, type ChannelMessage as f, ChannelMultiplexer as g, type ChannelName as h, type ChunkReadable as i, DeferredChannelMultiplexer as j, DeferredDocConnector as k, type DocConnection as l, type DocConnector as m, type LayoutConfig as n, type LayoutContext as o, LoopbackStreamData as p, type MediaChunkSource as q, type MediaChunkSourceFactory as r, type MediaRecorderChunkSourceOptions as s, type PresenceState as t, type RecordingBucket as u, type RecordingLifecycle as v, type RecordingStatus as w, type RecordingsAccessor as x, type RequestOptions as y, type RequestStreamOptions 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;
|
|
@@ -118,6 +119,19 @@ interface SessionPhaseError {
|
|
|
118
119
|
httpStatus?: number;
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
type ActivationState = 'activating' | 'still-activating' | 'cold-boot' | 'degraded' | 'first-media';
|
|
123
|
+
|
|
124
|
+
interface ActivationEvent {
|
|
125
|
+
|
|
126
|
+
state: ActivationState;
|
|
127
|
+
|
|
128
|
+
elapsedMs: number;
|
|
129
|
+
|
|
130
|
+
hint?: string;
|
|
131
|
+
|
|
132
|
+
stream?: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
121
135
|
interface SessionPhase {
|
|
122
136
|
|
|
123
137
|
name: SessionPhaseName;
|
|
@@ -362,6 +376,14 @@ interface RequestStreamOptions {
|
|
|
362
376
|
docSyncTimeout?: number;
|
|
363
377
|
}
|
|
364
378
|
|
|
379
|
+
type SessionEndResult = {
|
|
380
|
+
status: 'ended';
|
|
381
|
+
requestId: string;
|
|
382
|
+
} | {
|
|
383
|
+
status: 'canceled';
|
|
384
|
+
requestId: string;
|
|
385
|
+
};
|
|
386
|
+
|
|
365
387
|
interface Session {
|
|
366
388
|
|
|
367
389
|
readonly id: string;
|
|
@@ -376,6 +398,8 @@ interface Session {
|
|
|
376
398
|
|
|
377
399
|
doc(key: string): SessionDocument;
|
|
378
400
|
|
|
401
|
+
readonly mediaTransport: 'webtransport' | 'webrtc' | null;
|
|
402
|
+
|
|
379
403
|
readonly presence: Presence;
|
|
380
404
|
|
|
381
405
|
touch(): void;
|
|
@@ -388,6 +412,8 @@ interface Session {
|
|
|
388
412
|
|
|
389
413
|
onPhase(handler: (phase: SessionPhase) => void): () => void;
|
|
390
414
|
|
|
415
|
+
onActivation?(handler: (event: ActivationEvent) => void): () => void;
|
|
416
|
+
|
|
391
417
|
whenLive(options?: {
|
|
392
418
|
timeout?: number;
|
|
393
419
|
signal?: AbortSignal;
|
|
@@ -401,6 +427,8 @@ interface Session {
|
|
|
401
427
|
|
|
402
428
|
onRecovery(hook: () => void): () => void;
|
|
403
429
|
|
|
430
|
+
end(): Promise<SessionEndResult>;
|
|
431
|
+
|
|
404
432
|
disconnect(): void;
|
|
405
433
|
}
|
|
406
434
|
|
|
@@ -500,6 +528,8 @@ interface AppOptions {
|
|
|
500
528
|
authProvider?: string;
|
|
501
529
|
|
|
502
530
|
functionsUrl?: string;
|
|
531
|
+
|
|
532
|
+
allowWebTransport?: boolean;
|
|
503
533
|
}
|
|
504
534
|
interface AccessTokenOptions {
|
|
505
535
|
forceRefresh?: boolean;
|
|
@@ -612,6 +642,8 @@ declare class TransportSession {
|
|
|
612
642
|
private _options;
|
|
613
643
|
private _emitter;
|
|
614
644
|
private _ws;
|
|
645
|
+
|
|
646
|
+
private _connectedUrl;
|
|
615
647
|
private _device;
|
|
616
648
|
private _recvTransport;
|
|
617
649
|
private _sendTransport;
|
|
@@ -704,6 +736,8 @@ declare class TransportSession {
|
|
|
704
736
|
get multiplexer(): ChannelMultiplexer | null;
|
|
705
737
|
get isOpen(): boolean;
|
|
706
738
|
|
|
739
|
+
get connectedUrl(): string | null;
|
|
740
|
+
|
|
707
741
|
getTrackByName(name: string): MediaStreamTrack | undefined;
|
|
708
742
|
setAuth(options: Pick<TransportSessionOptions, 'orgId' | 'jwt' | 'authProvider'>): void;
|
|
709
743
|
constructor(options?: TransportSessionOptions);
|
|
@@ -917,4 +951,4 @@ interface DataChannelTransport {
|
|
|
917
951
|
|
|
918
952
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
919
953
|
|
|
920
|
-
export { type
|
|
954
|
+
export { type StreamChunkOptions as $, type AccessTokenOptions as A, type RuntimeArtifact as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type RuntimeArtifactDownload as E, type RuntimeArtifactsAccessor as F, type RuntimeAvailability as G, type SceneGraph as H, type Session as I, type SessionDocument as J, SessionDocumentImpl as K, type Layer as L, type MediaChunkBinding as M, type SessionEndResult as N, type SessionFailureKind as O, type Presence as P, type SessionPhase as Q, type Recording as R, type SceneContext as S, type SessionPhaseError as T, type SessionPhaseName as U, type SessionStartOptions as V, type SessionStatus as W, type SessionStream as X, type SessionText as Y, type Store as Z, type StoreOptions as _, type ActivationEvent as a, type StreamDataTransport as a0, TransportSession as a1, type TransportSessionOptions as a2, type TransportState as a3, createPresence as a4, createWebsocketDocConnector as a5, deriveYjsServerUrl as a6, isPendingRecording as a7, mediaRecorderChunkSource as a8, streamDataLabel as a9, transportStreamData as aa, type ActivationState as b, type App as c, type AppOptions as d, type AttachOptions as e, type ChannelMessage as f, ChannelMultiplexer as g, type ChannelName as h, type ChunkReadable as i, DeferredChannelMultiplexer as j, DeferredDocConnector as k, type DocConnection as l, type DocConnector as m, type LayoutConfig as n, type LayoutContext as o, LoopbackStreamData as p, type MediaChunkSource as q, type MediaChunkSourceFactory as r, type MediaRecorderChunkSourceOptions as s, type PresenceState as t, type RecordingBucket as u, type RecordingLifecycle as v, type RecordingStatus as w, type RecordingsAccessor as x, type RequestOptions as y, type RequestStreamOptions as z };
|