@urun-sh/core 0.2.46 → 0.2.47
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/chunk-FFQBRQM7.mjs +3 -0
- package/dist/chunk-MFBAY7ST.mjs +8 -0
- package/dist/index.browser.d.mts +4 -4
- package/dist/index.browser.d.ts +4 -4
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- 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 +2 -2
- 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 +5 -5
- package/dist/internal.mjs +1 -1
- package/dist/{stream-data-a_RrPi2p.d.mts → stream-data-DVQgPiJ2.d.mts} +25 -2
- package/dist/{stream-data-a_RrPi2p.d.ts → stream-data-DVQgPiJ2.d.ts} +25 -2
- package/package.json +1 -1
- package/dist/chunk-DUCJ3UFC.mjs +0 -8
- package/dist/chunk-OXPELTWD.mjs +0 -3
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{E as r,H as t,I as
|
|
2
|
+
import{E as r,H as t,I as n,J as a,L as s,M as p,N as m,R as c,S as i,T as l,U as S,V as f,W as x,X as C,a as e,b as o}from"./chunk-MFBAY7ST.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,f as DeferredDocConnector,s as LoopbackStreamData,x as SessionDocumentImpl,c as TransportSession,r as allocateSession,C as createPresence,S as createWebsocketDocConnector,l as deriveYjsServerUrl,a as ensureNodeWebRTC,t as isNodeRuntime,n as nodeMediasoupHandlerName,m as streamDataLabel,p as transportStreamData};
|
|
@@ -35,6 +35,19 @@ declare function mediaRecorderChunkSource(binding: MediaChunkBinding, options?:
|
|
|
35
35
|
|
|
36
36
|
declare const DOC_SYNC_WIRE_CONTRACT_VERSION = 1;
|
|
37
37
|
|
|
38
|
+
interface DocConnectionState {
|
|
39
|
+
|
|
40
|
+
connected: boolean;
|
|
41
|
+
|
|
42
|
+
consecutiveFailures: number;
|
|
43
|
+
|
|
44
|
+
lastCloseCode: number | null;
|
|
45
|
+
|
|
46
|
+
lastCloseReason: string | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type DocTokenSupplier = () => string | undefined | Promise<string | undefined>;
|
|
50
|
+
|
|
38
51
|
interface DocConnection {
|
|
39
52
|
|
|
40
53
|
readonly awareness: Awareness;
|
|
@@ -45,6 +58,8 @@ interface DocConnection {
|
|
|
45
58
|
|
|
46
59
|
ensureConnected?(): void;
|
|
47
60
|
|
|
61
|
+
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
62
|
+
|
|
48
63
|
destroy(): void;
|
|
49
64
|
}
|
|
50
65
|
|
|
@@ -58,9 +73,13 @@ interface WebsocketDocConnectorOptions {
|
|
|
58
73
|
|
|
59
74
|
sessionId: string;
|
|
60
75
|
|
|
61
|
-
token?: string;
|
|
76
|
+
token?: string | DocTokenSupplier;
|
|
62
77
|
|
|
63
78
|
WebSocketPolyfill?: typeof WebSocket;
|
|
79
|
+
|
|
80
|
+
maxBackoffTimeMs?: number;
|
|
81
|
+
|
|
82
|
+
dialTimeoutMs?: number;
|
|
64
83
|
}
|
|
65
84
|
|
|
66
85
|
declare function createWebsocketDocConnector(opts: WebsocketDocConnectorOptions): DocConnector;
|
|
@@ -278,6 +297,8 @@ interface SessionDocument {
|
|
|
278
297
|
readonly synced: boolean;
|
|
279
298
|
|
|
280
299
|
onSynced(handler: () => void): () => void;
|
|
300
|
+
|
|
301
|
+
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
281
302
|
}
|
|
282
303
|
|
|
283
304
|
interface SessionStream {
|
|
@@ -974,6 +995,8 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
974
995
|
|
|
975
996
|
ensureConnected(): void;
|
|
976
997
|
|
|
998
|
+
onConnectionState(handler: (state: DocConnectionState) => void): () => void;
|
|
999
|
+
|
|
977
1000
|
onSynced(handler: () => void): () => void;
|
|
978
1001
|
|
|
979
1002
|
set(patch: Record<string, unknown>): void;
|
|
@@ -1032,4 +1055,4 @@ interface DataChannelTransport {
|
|
|
1032
1055
|
|
|
1033
1056
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1034
1057
|
|
|
1035
|
-
export { type
|
|
1058
|
+
export { type SessionPhaseName as $, type AccessTokenOptions$1 as A, type PrewakeStatus as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type RecordingBucket as E, type RecordingLifecycle as F, type RecordingStatus as G, type RecordingsAccessor as H, type ReleaseSessionBeaconOptions as I, type RequestOptions as J, type RequestStreamOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type RuntimeArtifact as N, type RuntimeArtifactDownload as O, type Presence as P, type RuntimeArtifactsAccessor as Q, type Recording as R, type RuntimeAvailability as S, type Session as T, type SessionDiagnostic as U, type SessionDocument as V, SessionDocumentImpl as W, type SessionEndResult as X, type SessionFailureKind as Y, type SessionPhase as Z, type SessionPhaseError as _, type AccessTokenOptions as a, type SessionStartOptions as a0, type SessionStatus as a1, type SessionStream as a2, type SessionText as a3, type Store as a4, type StoreOptions as a5, type StreamChunkOptions as a6, type StreamDataTransport as a7, TransportSession as a8, type TransportSessionOptions as a9, type TransportState as aa, allocateSession as ab, createPresence as ac, createWebsocketDocConnector as ad, deriveYjsServerUrl as ae, derivedLegName as af, derivedLegRole as ag, isPendingRecording as ah, mediaRecorderChunkSource as ai, prewake as aj, releaseSessionBeacon as ak, streamDataLabel as al, transportStreamData as am, type ActivationEvent as b, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type ChannelMessage as i, ChannelMultiplexer as j, type ChannelName as k, type ChunkReadable as l, DOC_SYNC_WIRE_CONTRACT_VERSION as m, DeferredChannelMultiplexer as n, DeferredDocConnector as o, type DerivedLegRole as p, type DocConnection as q, type DocConnectionState as r, type DocConnector as s, type DocTokenSupplier as t, type MediaChunkSource as u, type MediaChunkSourceFactory as v, type MediaRecorderChunkSourceOptions as w, type PresenceState as x, type PrewakeOptions as y, type PrewakeResult as z };
|
|
@@ -35,6 +35,19 @@ declare function mediaRecorderChunkSource(binding: MediaChunkBinding, options?:
|
|
|
35
35
|
|
|
36
36
|
declare const DOC_SYNC_WIRE_CONTRACT_VERSION = 1;
|
|
37
37
|
|
|
38
|
+
interface DocConnectionState {
|
|
39
|
+
|
|
40
|
+
connected: boolean;
|
|
41
|
+
|
|
42
|
+
consecutiveFailures: number;
|
|
43
|
+
|
|
44
|
+
lastCloseCode: number | null;
|
|
45
|
+
|
|
46
|
+
lastCloseReason: string | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type DocTokenSupplier = () => string | undefined | Promise<string | undefined>;
|
|
50
|
+
|
|
38
51
|
interface DocConnection {
|
|
39
52
|
|
|
40
53
|
readonly awareness: Awareness;
|
|
@@ -45,6 +58,8 @@ interface DocConnection {
|
|
|
45
58
|
|
|
46
59
|
ensureConnected?(): void;
|
|
47
60
|
|
|
61
|
+
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
62
|
+
|
|
48
63
|
destroy(): void;
|
|
49
64
|
}
|
|
50
65
|
|
|
@@ -58,9 +73,13 @@ interface WebsocketDocConnectorOptions {
|
|
|
58
73
|
|
|
59
74
|
sessionId: string;
|
|
60
75
|
|
|
61
|
-
token?: string;
|
|
76
|
+
token?: string | DocTokenSupplier;
|
|
62
77
|
|
|
63
78
|
WebSocketPolyfill?: typeof WebSocket;
|
|
79
|
+
|
|
80
|
+
maxBackoffTimeMs?: number;
|
|
81
|
+
|
|
82
|
+
dialTimeoutMs?: number;
|
|
64
83
|
}
|
|
65
84
|
|
|
66
85
|
declare function createWebsocketDocConnector(opts: WebsocketDocConnectorOptions): DocConnector;
|
|
@@ -278,6 +297,8 @@ interface SessionDocument {
|
|
|
278
297
|
readonly synced: boolean;
|
|
279
298
|
|
|
280
299
|
onSynced(handler: () => void): () => void;
|
|
300
|
+
|
|
301
|
+
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
281
302
|
}
|
|
282
303
|
|
|
283
304
|
interface SessionStream {
|
|
@@ -974,6 +995,8 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
974
995
|
|
|
975
996
|
ensureConnected(): void;
|
|
976
997
|
|
|
998
|
+
onConnectionState(handler: (state: DocConnectionState) => void): () => void;
|
|
999
|
+
|
|
977
1000
|
onSynced(handler: () => void): () => void;
|
|
978
1001
|
|
|
979
1002
|
set(patch: Record<string, unknown>): void;
|
|
@@ -1032,4 +1055,4 @@ interface DataChannelTransport {
|
|
|
1032
1055
|
|
|
1033
1056
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1034
1057
|
|
|
1035
|
-
export { type
|
|
1058
|
+
export { type SessionPhaseName as $, type AccessTokenOptions$1 as A, type PrewakeStatus as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type RecordingBucket as E, type RecordingLifecycle as F, type RecordingStatus as G, type RecordingsAccessor as H, type ReleaseSessionBeaconOptions as I, type RequestOptions as J, type RequestStreamOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type RuntimeArtifact as N, type RuntimeArtifactDownload as O, type Presence as P, type RuntimeArtifactsAccessor as Q, type Recording as R, type RuntimeAvailability as S, type Session as T, type SessionDiagnostic as U, type SessionDocument as V, SessionDocumentImpl as W, type SessionEndResult as X, type SessionFailureKind as Y, type SessionPhase as Z, type SessionPhaseError as _, type AccessTokenOptions as a, type SessionStartOptions as a0, type SessionStatus as a1, type SessionStream as a2, type SessionText as a3, type Store as a4, type StoreOptions as a5, type StreamChunkOptions as a6, type StreamDataTransport as a7, TransportSession as a8, type TransportSessionOptions as a9, type TransportState as aa, allocateSession as ab, createPresence as ac, createWebsocketDocConnector as ad, deriveYjsServerUrl as ae, derivedLegName as af, derivedLegRole as ag, isPendingRecording as ah, mediaRecorderChunkSource as ai, prewake as aj, releaseSessionBeacon as ak, streamDataLabel as al, transportStreamData as am, type ActivationEvent as b, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type ChannelMessage as i, ChannelMultiplexer as j, type ChannelName as k, type ChunkReadable as l, DOC_SYNC_WIRE_CONTRACT_VERSION as m, DeferredChannelMultiplexer as n, DeferredDocConnector as o, type DerivedLegRole as p, type DocConnection as q, type DocConnectionState as r, type DocConnector as s, type DocTokenSupplier as t, type MediaChunkSource as u, type MediaChunkSourceFactory as v, type MediaRecorderChunkSourceOptions as w, type PresenceState as x, type PrewakeOptions as y, type PrewakeResult as z };
|