@urun-sh/core 0.3.7 → 0.4.0
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 +21 -1
- package/dist/{chunk-FSUNC7FS.mjs → chunk-D3CIQIUV.mjs} +5 -5
- package/dist/chunk-LMLORJE7.mjs +3 -0
- package/dist/index.browser.d.mts +71 -4
- package/dist/index.browser.d.ts +71 -4
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +71 -4
- package/dist/index.d.ts +71 -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-W9S0z8Wv.d.mts → stream-data-CXrgcYCu.d.mts} +29 -5
- package/dist/{stream-data-W9S0z8Wv.d.ts → stream-data-CXrgcYCu.d.ts} +29 -5
- package/package.json +1 -1
- package/dist/chunk-6N23OXJS.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{$ as
|
|
2
|
+
import{$ as m,G as r,M as t,N as n,O as a,P as s,U as p,V as c,W as l,a as e,aa as i,b as o,ba as S,ca as f,da as x,ea as C,fa as D}from"./chunk-D3CIQIUV.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,r as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,s as ensureNodeWebRTC,t as isNodeRuntime,n as nodeMediasoupHandlerName,a as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
|
|
@@ -138,7 +138,7 @@ declare function createPresence(awareness: Awareness): Presence;
|
|
|
138
138
|
|
|
139
139
|
type TransportState = 'connecting' | 'connected' | 'reconnecting' | 'renegotiating' | 'disconnected' | 'failed';
|
|
140
140
|
|
|
141
|
-
type SessionPhaseName = 'idle' | 'queued' | 'unavailable' | 'provisioning' | 'waiting_for_capacity' | 'connecting' | 'live' | '
|
|
141
|
+
type SessionPhaseName = 'idle' | 'queued' | 'unavailable' | 'provisioning' | 'waiting_for_capacity' | 'connecting' | 'live' | 'paused' | 'error' | 'unknown';
|
|
142
142
|
|
|
143
143
|
interface RuntimeAvailability {
|
|
144
144
|
state: 'unavailable' | 'starting' | 'busy';
|
|
@@ -177,7 +177,7 @@ type RuntimeWakeDetail = (RuntimeWakeDetailBase & {
|
|
|
177
177
|
golden?: never;
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
type SessionFailureKind = 'create-failed' | 'never-live' | 'transport-failed' | 'media-permission' | '
|
|
180
|
+
type SessionFailureKind = 'create-failed' | 'never-live' | 'transport-failed' | 'media-permission' | 'runtime-failed' | 'insufficient-credits' | 'produce-timeout';
|
|
181
181
|
|
|
182
182
|
interface SessionPhaseError {
|
|
183
183
|
|
|
@@ -521,6 +521,8 @@ interface Session {
|
|
|
521
521
|
|
|
522
522
|
end(): Promise<SessionEndResult>;
|
|
523
523
|
|
|
524
|
+
detach(): void;
|
|
525
|
+
|
|
524
526
|
disconnect(): void;
|
|
525
527
|
}
|
|
526
528
|
|
|
@@ -661,8 +663,15 @@ interface AttachOptions {
|
|
|
661
663
|
functionsUrl?: string;
|
|
662
664
|
}
|
|
663
665
|
|
|
666
|
+
interface StartSessionOptions {
|
|
667
|
+
|
|
668
|
+
sessionId?: string;
|
|
669
|
+
|
|
670
|
+
label?: string;
|
|
671
|
+
}
|
|
672
|
+
|
|
664
673
|
interface App {
|
|
665
|
-
[fnName: string]: (args?: Record<string, unknown
|
|
674
|
+
[fnName: string]: (args?: Record<string, unknown>, options?: StartSessionOptions) => Session;
|
|
666
675
|
}
|
|
667
676
|
|
|
668
677
|
type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled'
|
|
@@ -733,6 +742,8 @@ interface AllocateSessionOptions {
|
|
|
733
742
|
|
|
734
743
|
sessionKey?: string;
|
|
735
744
|
|
|
745
|
+
label?: string;
|
|
746
|
+
|
|
736
747
|
priority?: 'preempt';
|
|
737
748
|
}
|
|
738
749
|
interface AccessTokenOptions {
|
|
@@ -760,6 +771,15 @@ interface ReleaseSessionBeaconOptions {
|
|
|
760
771
|
|
|
761
772
|
declare function releaseSessionBeacon(options: ReleaseSessionBeaconOptions): void;
|
|
762
773
|
declare function allocateSession(options: AllocateSessionOptions): Promise<AllocatedSession>;
|
|
774
|
+
|
|
775
|
+
interface SessionDirectoryRequestOptions {
|
|
776
|
+
baseUrl: string;
|
|
777
|
+
fallbackUrls?: readonly string[];
|
|
778
|
+
orgId: string;
|
|
779
|
+
jwt?: string;
|
|
780
|
+
getAccessToken?: AllocateSessionOptions['getAccessToken'];
|
|
781
|
+
authProvider?: string;
|
|
782
|
+
}
|
|
763
783
|
interface PrewakeOptions {
|
|
764
784
|
baseUrl: string;
|
|
765
785
|
|
|
@@ -1308,6 +1328,8 @@ declare class TransportSession {
|
|
|
1308
1328
|
|
|
1309
1329
|
private _selfEpochAdoptUntil;
|
|
1310
1330
|
|
|
1331
|
+
private _pausedIncarnation;
|
|
1332
|
+
|
|
1311
1333
|
private _consumerId;
|
|
1312
1334
|
|
|
1313
1335
|
private _streamDataHandlers;
|
|
@@ -1363,6 +1385,8 @@ declare class TransportSession {
|
|
|
1363
1385
|
isStaleIncarnation(epoch: number): boolean;
|
|
1364
1386
|
|
|
1365
1387
|
isStaleClosedMarker(marker: Record<string, unknown> | null | undefined): boolean;
|
|
1388
|
+
|
|
1389
|
+
private _isStaleLivenessEvidence;
|
|
1366
1390
|
connect(startOptions?: SessionStartOptions): Promise<void>;
|
|
1367
1391
|
|
|
1368
1392
|
leaveLeg(): boolean;
|
|
@@ -1514,7 +1538,7 @@ declare class TransportSession {
|
|
|
1514
1538
|
private _setState;
|
|
1515
1539
|
|
|
1516
1540
|
|
|
1517
|
-
private
|
|
1541
|
+
private _isParkedPhase;
|
|
1518
1542
|
private _setPhase;
|
|
1519
1543
|
|
|
1520
1544
|
reportAdmission(update: {
|
|
@@ -1624,4 +1648,4 @@ interface DataChannelTransport {
|
|
|
1624
1648
|
|
|
1625
1649
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1626
1650
|
|
|
1627
|
-
export { type RequestOptions as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PathLiveness as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type Presence as O, type PathHealthReporting as P, type PresenceState as Q, type PrewakeOptions as R, type PrewakeResult as S, type PrewakeStatus as T, type QuicStreamDataTransport as U, type Recording as V, type RecordingBucket as W, type RecordingLifecycle as X, type RecordingStatus as Y, type RecordingsAccessor as Z, type ReleaseSessionBeaconOptions as _, type AccessTokenOptions as a,
|
|
1651
|
+
export { type RequestOptions as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PathLiveness as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type Presence as O, type PathHealthReporting as P, type PresenceState as Q, type PrewakeOptions as R, type PrewakeResult as S, type PrewakeStatus as T, type QuicStreamDataTransport as U, type Recording as V, type RecordingBucket as W, type RecordingLifecycle as X, type RecordingStatus as Y, type RecordingsAccessor as Z, type ReleaseSessionBeaconOptions as _, type AccessTokenOptions as a, encodeWtControlFrame as a$, type RequestStreamOptions as a0, type RuntimeArtifact as a1, type RuntimeArtifactDownload as a2, type RuntimeArtifactsAccessor as a3, type RuntimeAvailability as a4, type RuntimeWakeDetail as a5, type RuntimeWakeGolden as a6, type RuntimeWakeReasonCode as a7, SIGNALING_PROTOCOL_VERSION as a8, STREAM_END as a9, type TransportOfferResponse as aA, TransportSession as aB, type TransportSessionOptions as aC, TransportSessionSignaling as aD, type TransportState as aE, type VideoPlayoutOptions as aF, WT_CONTROL_FRAME_MAX as aG, WT_DATA_STREAM_VERSION as aH, type WatchGenerationTickOptions as aI, type WtAudioLaneSeam as aJ, type WtAudioUplinkSeam as aK, WtControlDecoder as aL, type WtControlMessage as aM, type WtDataEnvelope as aN, type WtDataLaneSink as aO, WtDataStreamParser as aP, WtDataUplinkSender as aQ, type WtVideoUplinkSeam as aR, allocateSession as aS, consumeWtDataStreams as aT, createPresence as aU, createWebsocketDocConnector as aV, decodeStreamEnvelope as aW, deriveYjsServerUrl as aX, derivedLegName as aY, derivedLegRole as aZ, encodeStreamEnvelope as a_, type Session as aa, type SessionDiagnostic as ab, type SessionDirectoryRequestOptions as ac, type SessionDocument as ad, SessionDocumentImpl as ae, type SessionEndResult as af, type SessionFailureKind as ag, type SessionPhase as ah, type SessionPhaseError as ai, type SessionPhaseName as aj, type SessionStartOptions as ak, type SessionStatsOptions as al, type SessionStatsSample as am, type SessionStatus as an, type SessionStream as ao, type SessionText as ap, type SignalCarrier as aq, type Signaling as ar, type StartSessionOptions as as, type Store as at, type StoreOptions as au, type StreamChunkOptions as av, type StreamDataTransport as aw, type TransportEstablishedNotify as ax, TransportNegotiator as ay, type TransportOfferRequest as az, type ActivationEvent as b, isPendingRecording as b0, mediaRecorderChunkSource as b1, parseDgramHeader as b2, prewake as b3, releaseSessionBeacon as b4, streamDataLabel as b5, transportStreamData as b6, watchGenerationTick as b7, writeDgramHeader as b8, 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 AudioPlayoutOptions as i, type ChannelMessage as j, ChannelMultiplexer as k, type ChannelName as l, type ChunkReadable as m, DGRAM_HEADER_BYTES as n, DOC_SYNC_WIRE_CONTRACT_VERSION as o, DeferredChannelMultiplexer as p, DeferredDocConnector as q, type DerivedLegRole as r, type DgramHeader as s, type DocConnection as t, type DocConnectionState as u, type DocConnector as v, type DocServerUrlResolver as w, type DocTokenSupplier as x, GENERATION_TICK_MAX_EXTRAPOLATION_MS as y, type GenerationTick as z };
|
|
@@ -138,7 +138,7 @@ declare function createPresence(awareness: Awareness): Presence;
|
|
|
138
138
|
|
|
139
139
|
type TransportState = 'connecting' | 'connected' | 'reconnecting' | 'renegotiating' | 'disconnected' | 'failed';
|
|
140
140
|
|
|
141
|
-
type SessionPhaseName = 'idle' | 'queued' | 'unavailable' | 'provisioning' | 'waiting_for_capacity' | 'connecting' | 'live' | '
|
|
141
|
+
type SessionPhaseName = 'idle' | 'queued' | 'unavailable' | 'provisioning' | 'waiting_for_capacity' | 'connecting' | 'live' | 'paused' | 'error' | 'unknown';
|
|
142
142
|
|
|
143
143
|
interface RuntimeAvailability {
|
|
144
144
|
state: 'unavailable' | 'starting' | 'busy';
|
|
@@ -177,7 +177,7 @@ type RuntimeWakeDetail = (RuntimeWakeDetailBase & {
|
|
|
177
177
|
golden?: never;
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
type SessionFailureKind = 'create-failed' | 'never-live' | 'transport-failed' | 'media-permission' | '
|
|
180
|
+
type SessionFailureKind = 'create-failed' | 'never-live' | 'transport-failed' | 'media-permission' | 'runtime-failed' | 'insufficient-credits' | 'produce-timeout';
|
|
181
181
|
|
|
182
182
|
interface SessionPhaseError {
|
|
183
183
|
|
|
@@ -521,6 +521,8 @@ interface Session {
|
|
|
521
521
|
|
|
522
522
|
end(): Promise<SessionEndResult>;
|
|
523
523
|
|
|
524
|
+
detach(): void;
|
|
525
|
+
|
|
524
526
|
disconnect(): void;
|
|
525
527
|
}
|
|
526
528
|
|
|
@@ -661,8 +663,15 @@ interface AttachOptions {
|
|
|
661
663
|
functionsUrl?: string;
|
|
662
664
|
}
|
|
663
665
|
|
|
666
|
+
interface StartSessionOptions {
|
|
667
|
+
|
|
668
|
+
sessionId?: string;
|
|
669
|
+
|
|
670
|
+
label?: string;
|
|
671
|
+
}
|
|
672
|
+
|
|
664
673
|
interface App {
|
|
665
|
-
[fnName: string]: (args?: Record<string, unknown
|
|
674
|
+
[fnName: string]: (args?: Record<string, unknown>, options?: StartSessionOptions) => Session;
|
|
666
675
|
}
|
|
667
676
|
|
|
668
677
|
type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled'
|
|
@@ -733,6 +742,8 @@ interface AllocateSessionOptions {
|
|
|
733
742
|
|
|
734
743
|
sessionKey?: string;
|
|
735
744
|
|
|
745
|
+
label?: string;
|
|
746
|
+
|
|
736
747
|
priority?: 'preempt';
|
|
737
748
|
}
|
|
738
749
|
interface AccessTokenOptions {
|
|
@@ -760,6 +771,15 @@ interface ReleaseSessionBeaconOptions {
|
|
|
760
771
|
|
|
761
772
|
declare function releaseSessionBeacon(options: ReleaseSessionBeaconOptions): void;
|
|
762
773
|
declare function allocateSession(options: AllocateSessionOptions): Promise<AllocatedSession>;
|
|
774
|
+
|
|
775
|
+
interface SessionDirectoryRequestOptions {
|
|
776
|
+
baseUrl: string;
|
|
777
|
+
fallbackUrls?: readonly string[];
|
|
778
|
+
orgId: string;
|
|
779
|
+
jwt?: string;
|
|
780
|
+
getAccessToken?: AllocateSessionOptions['getAccessToken'];
|
|
781
|
+
authProvider?: string;
|
|
782
|
+
}
|
|
763
783
|
interface PrewakeOptions {
|
|
764
784
|
baseUrl: string;
|
|
765
785
|
|
|
@@ -1308,6 +1328,8 @@ declare class TransportSession {
|
|
|
1308
1328
|
|
|
1309
1329
|
private _selfEpochAdoptUntil;
|
|
1310
1330
|
|
|
1331
|
+
private _pausedIncarnation;
|
|
1332
|
+
|
|
1311
1333
|
private _consumerId;
|
|
1312
1334
|
|
|
1313
1335
|
private _streamDataHandlers;
|
|
@@ -1363,6 +1385,8 @@ declare class TransportSession {
|
|
|
1363
1385
|
isStaleIncarnation(epoch: number): boolean;
|
|
1364
1386
|
|
|
1365
1387
|
isStaleClosedMarker(marker: Record<string, unknown> | null | undefined): boolean;
|
|
1388
|
+
|
|
1389
|
+
private _isStaleLivenessEvidence;
|
|
1366
1390
|
connect(startOptions?: SessionStartOptions): Promise<void>;
|
|
1367
1391
|
|
|
1368
1392
|
leaveLeg(): boolean;
|
|
@@ -1514,7 +1538,7 @@ declare class TransportSession {
|
|
|
1514
1538
|
private _setState;
|
|
1515
1539
|
|
|
1516
1540
|
|
|
1517
|
-
private
|
|
1541
|
+
private _isParkedPhase;
|
|
1518
1542
|
private _setPhase;
|
|
1519
1543
|
|
|
1520
1544
|
reportAdmission(update: {
|
|
@@ -1624,4 +1648,4 @@ interface DataChannelTransport {
|
|
|
1624
1648
|
|
|
1625
1649
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1626
1650
|
|
|
1627
|
-
export { type RequestOptions as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PathLiveness as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type Presence as O, type PathHealthReporting as P, type PresenceState as Q, type PrewakeOptions as R, type PrewakeResult as S, type PrewakeStatus as T, type QuicStreamDataTransport as U, type Recording as V, type RecordingBucket as W, type RecordingLifecycle as X, type RecordingStatus as Y, type RecordingsAccessor as Z, type ReleaseSessionBeaconOptions as _, type AccessTokenOptions as a,
|
|
1651
|
+
export { type RequestOptions as $, type AccessTokenOptions$1 as A, type MediaChunkSource as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSourceFactory as E, type MediaRecorderChunkSourceOptions as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaSession as H, type InboundStatsSample as I, type NegotiatorOptions as J, type PathLiveness as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type Presence as O, type PathHealthReporting as P, type PresenceState as Q, type PrewakeOptions as R, type PrewakeResult as S, type PrewakeStatus as T, type QuicStreamDataTransport as U, type Recording as V, type RecordingBucket as W, type RecordingLifecycle as X, type RecordingStatus as Y, type RecordingsAccessor as Z, type ReleaseSessionBeaconOptions as _, type AccessTokenOptions as a, encodeWtControlFrame as a$, type RequestStreamOptions as a0, type RuntimeArtifact as a1, type RuntimeArtifactDownload as a2, type RuntimeArtifactsAccessor as a3, type RuntimeAvailability as a4, type RuntimeWakeDetail as a5, type RuntimeWakeGolden as a6, type RuntimeWakeReasonCode as a7, SIGNALING_PROTOCOL_VERSION as a8, STREAM_END as a9, type TransportOfferResponse as aA, TransportSession as aB, type TransportSessionOptions as aC, TransportSessionSignaling as aD, type TransportState as aE, type VideoPlayoutOptions as aF, WT_CONTROL_FRAME_MAX as aG, WT_DATA_STREAM_VERSION as aH, type WatchGenerationTickOptions as aI, type WtAudioLaneSeam as aJ, type WtAudioUplinkSeam as aK, WtControlDecoder as aL, type WtControlMessage as aM, type WtDataEnvelope as aN, type WtDataLaneSink as aO, WtDataStreamParser as aP, WtDataUplinkSender as aQ, type WtVideoUplinkSeam as aR, allocateSession as aS, consumeWtDataStreams as aT, createPresence as aU, createWebsocketDocConnector as aV, decodeStreamEnvelope as aW, deriveYjsServerUrl as aX, derivedLegName as aY, derivedLegRole as aZ, encodeStreamEnvelope as a_, type Session as aa, type SessionDiagnostic as ab, type SessionDirectoryRequestOptions as ac, type SessionDocument as ad, SessionDocumentImpl as ae, type SessionEndResult as af, type SessionFailureKind as ag, type SessionPhase as ah, type SessionPhaseError as ai, type SessionPhaseName as aj, type SessionStartOptions as ak, type SessionStatsOptions as al, type SessionStatsSample as am, type SessionStatus as an, type SessionStream as ao, type SessionText as ap, type SignalCarrier as aq, type Signaling as ar, type StartSessionOptions as as, type Store as at, type StoreOptions as au, type StreamChunkOptions as av, type StreamDataTransport as aw, type TransportEstablishedNotify as ax, TransportNegotiator as ay, type TransportOfferRequest as az, type ActivationEvent as b, isPendingRecording as b0, mediaRecorderChunkSource as b1, parseDgramHeader as b2, prewake as b3, releaseSessionBeacon as b4, streamDataLabel as b5, transportStreamData as b6, watchGenerationTick as b7, writeDgramHeader as b8, 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 AudioPlayoutOptions as i, type ChannelMessage as j, ChannelMultiplexer as k, type ChannelName as l, type ChunkReadable as m, DGRAM_HEADER_BYTES as n, DOC_SYNC_WIRE_CONTRACT_VERSION as o, DeferredChannelMultiplexer as p, DeferredDocConnector as q, type DerivedLegRole as r, type DgramHeader as s, type DocConnection as t, type DocConnectionState as u, type DocConnector as v, type DocServerUrlResolver as w, type DocTokenSupplier as x, GENERATION_TICK_MAX_EXTRAPOLATION_MS as y, type GenerationTick as z };
|