@urun-sh/core 0.5.1 → 0.5.3
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 +14 -0
- package/dist/{chunk-DEL3BEYT.mjs → chunk-2IZQGJA3.mjs} +2 -2
- package/dist/{chunk-NTMFUGAJ.mjs → chunk-PJ3QK656.mjs} +5 -5
- package/dist/index.browser.d.mts +23 -4
- package/dist/index.browser.d.ts +23 -4
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +23 -4
- package/dist/index.d.ts +23 -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-DR_uxiuv.d.mts → stream-data-DoU_1K17.d.mts} +33 -1
- package/dist/{stream-data-DR_uxiuv.d.ts → stream-data-DoU_1K17.d.ts} +33 -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{H as r,
|
|
2
|
+
import{H as r,O as t,P as n,Q as a,R as s,W as p,X as c,Y as l,a as e,b as o,ba as m,ca as i,da as S,ea as f,fa as x,ga as C,ha as D}from"./chunk-PJ3QK656.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};
|
|
@@ -79,6 +79,8 @@ interface DocConnection {
|
|
|
79
79
|
|
|
80
80
|
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
81
81
|
|
|
82
|
+
disconnect?(): void;
|
|
83
|
+
|
|
82
84
|
destroy(): void;
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -238,6 +240,8 @@ interface SessionPhase {
|
|
|
238
240
|
error?: SessionPhaseError;
|
|
239
241
|
|
|
240
242
|
reason?: string;
|
|
243
|
+
|
|
244
|
+
region?: string | null;
|
|
241
245
|
}
|
|
242
246
|
|
|
243
247
|
interface SessionStatus {
|
|
@@ -266,6 +270,8 @@ interface SessionStatus {
|
|
|
266
270
|
wakingSince?: number;
|
|
267
271
|
|
|
268
272
|
error?: SessionPhaseError;
|
|
273
|
+
|
|
274
|
+
region?: string | null;
|
|
269
275
|
}
|
|
270
276
|
|
|
271
277
|
interface TransportSessionOptions {
|
|
@@ -419,6 +425,10 @@ interface SessionDocument {
|
|
|
419
425
|
onSynced(handler: () => void): () => void;
|
|
420
426
|
|
|
421
427
|
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
428
|
+
|
|
429
|
+
disconnect?(): void;
|
|
430
|
+
|
|
431
|
+
reconnect?(): void;
|
|
422
432
|
}
|
|
423
433
|
|
|
424
434
|
interface SessionStream {
|
|
@@ -484,6 +494,8 @@ interface Session {
|
|
|
484
494
|
|
|
485
495
|
readonly status: SessionStatus;
|
|
486
496
|
|
|
497
|
+
readonly region?: string | null;
|
|
498
|
+
|
|
487
499
|
stream(name: string): SessionStream;
|
|
488
500
|
|
|
489
501
|
doc(key: string): SessionDocument;
|
|
@@ -494,6 +506,8 @@ interface Session {
|
|
|
494
506
|
|
|
495
507
|
touch(): void;
|
|
496
508
|
|
|
509
|
+
activity?(): void;
|
|
510
|
+
|
|
497
511
|
request(payload: unknown, options?: RequestOptions): Promise<unknown>;
|
|
498
512
|
|
|
499
513
|
requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
|
|
@@ -667,13 +681,19 @@ interface AttachOptions {
|
|
|
667
681
|
authProvider?: string;
|
|
668
682
|
|
|
669
683
|
functionsUrl?: string;
|
|
684
|
+
|
|
685
|
+
activity?: ActivitySignalMode;
|
|
670
686
|
}
|
|
671
687
|
|
|
688
|
+
type ActivitySignalMode = 'auto' | 'explicit';
|
|
689
|
+
|
|
672
690
|
interface StartSessionOptions {
|
|
673
691
|
|
|
674
692
|
sessionId?: string;
|
|
675
693
|
|
|
676
694
|
label?: string;
|
|
695
|
+
|
|
696
|
+
activity?: ActivitySignalMode;
|
|
677
697
|
}
|
|
678
698
|
|
|
679
699
|
interface App {
|
|
@@ -695,6 +715,8 @@ interface SessionGatewayResponse {
|
|
|
695
715
|
location?: string;
|
|
696
716
|
|
|
697
717
|
session_api_base?: string;
|
|
718
|
+
|
|
719
|
+
serving_region?: string | null;
|
|
698
720
|
request_id?: string;
|
|
699
721
|
session_id?: string;
|
|
700
722
|
ws_url?: string;
|
|
@@ -749,6 +771,8 @@ interface AdmissionUpdate {
|
|
|
749
771
|
refusalSource?: string;
|
|
750
772
|
|
|
751
773
|
refusalMessage?: string;
|
|
774
|
+
|
|
775
|
+
region?: string | null;
|
|
752
776
|
}
|
|
753
777
|
interface AllocateSessionOptions {
|
|
754
778
|
baseUrl: string;
|
|
@@ -1390,9 +1414,13 @@ declare class TransportSession {
|
|
|
1390
1414
|
|
|
1391
1415
|
setEndsAt(endsAt: Date | null): void;
|
|
1392
1416
|
|
|
1417
|
+
seedRegion(region: string | null | undefined): void;
|
|
1418
|
+
|
|
1393
1419
|
private _pastDeadline;
|
|
1394
1420
|
|
|
1395
1421
|
get status(): SessionStatus;
|
|
1422
|
+
|
|
1423
|
+
get region(): string | null | undefined;
|
|
1396
1424
|
get sessionId(): string | null;
|
|
1397
1425
|
get tracks(): Map<string, MediaStreamTrack>;
|
|
1398
1426
|
get multiplexer(): ChannelMultiplexer | null;
|
|
@@ -1609,6 +1637,10 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
1609
1637
|
|
|
1610
1638
|
ensureConnected(): void;
|
|
1611
1639
|
|
|
1640
|
+
reconnect(): void;
|
|
1641
|
+
|
|
1642
|
+
disconnect(): void;
|
|
1643
|
+
|
|
1612
1644
|
onConnectionState(handler: (state: DocConnectionState) => void): () => void;
|
|
1613
1645
|
|
|
1614
1646
|
onSynced(handler: () => void): () => void;
|
|
@@ -1675,4 +1707,4 @@ interface DataChannelTransport {
|
|
|
1675
1707
|
|
|
1676
1708
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1677
1709
|
|
|
1678
|
-
export { type
|
|
1710
|
+
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a, encodeStreamEnvelope as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, type TransportOfferRequest as aA, type TransportOfferResponse as aB, TransportSession as aC, type TransportSessionOptions as aD, TransportSessionSignaling as aE, type TransportState as aF, type VideoPlayoutOptions as aG, WT_CONTROL_FRAME_MAX as aH, WT_DATA_STREAM_VERSION as aI, type WatchGenerationTickOptions as aJ, type WtAudioLaneSeam as aK, type WtAudioUplinkSeam as aL, WtControlDecoder as aM, type WtControlMessage as aN, type WtDataEnvelope as aO, type WtDataLaneSink as aP, WtDataStreamParser as aQ, WtDataUplinkSender as aR, type WtVideoUplinkSeam as aS, allocateSession as aT, consumeWtDataStreams as aU, createPresence as aV, createWebsocketDocConnector as aW, decodeStreamEnvelope as aX, deriveYjsServerUrl as aY, derivedLegName as aZ, derivedLegRole as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionPhase as ai, type SessionPhaseError as aj, type SessionPhaseName as ak, type SessionStartOptions as al, type SessionStatsOptions as am, type SessionStatsSample as an, type SessionStatus as ao, type SessionStream as ap, type SessionText as aq, type SignalCarrier as ar, type Signaling as as, type StartSessionOptions as at, type Store as au, type StoreOptions as av, type StreamChunkOptions as aw, type StreamDataTransport as ax, type TransportEstablishedNotify as ay, TransportNegotiator as az, type ActivationEvent as b, encodeWtControlFrame as b0, isPendingRecording as b1, mediaRecorderChunkSource as b2, parseDgramHeader as b3, prewake as b4, releaseSessionBeacon as b5, streamDataLabel as b6, transportStreamData as b7, watchGenerationTick as b8, writeDgramHeader as b9, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
|
|
@@ -79,6 +79,8 @@ interface DocConnection {
|
|
|
79
79
|
|
|
80
80
|
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
81
81
|
|
|
82
|
+
disconnect?(): void;
|
|
83
|
+
|
|
82
84
|
destroy(): void;
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -238,6 +240,8 @@ interface SessionPhase {
|
|
|
238
240
|
error?: SessionPhaseError;
|
|
239
241
|
|
|
240
242
|
reason?: string;
|
|
243
|
+
|
|
244
|
+
region?: string | null;
|
|
241
245
|
}
|
|
242
246
|
|
|
243
247
|
interface SessionStatus {
|
|
@@ -266,6 +270,8 @@ interface SessionStatus {
|
|
|
266
270
|
wakingSince?: number;
|
|
267
271
|
|
|
268
272
|
error?: SessionPhaseError;
|
|
273
|
+
|
|
274
|
+
region?: string | null;
|
|
269
275
|
}
|
|
270
276
|
|
|
271
277
|
interface TransportSessionOptions {
|
|
@@ -419,6 +425,10 @@ interface SessionDocument {
|
|
|
419
425
|
onSynced(handler: () => void): () => void;
|
|
420
426
|
|
|
421
427
|
onConnectionState?(handler: (state: DocConnectionState) => void): () => void;
|
|
428
|
+
|
|
429
|
+
disconnect?(): void;
|
|
430
|
+
|
|
431
|
+
reconnect?(): void;
|
|
422
432
|
}
|
|
423
433
|
|
|
424
434
|
interface SessionStream {
|
|
@@ -484,6 +494,8 @@ interface Session {
|
|
|
484
494
|
|
|
485
495
|
readonly status: SessionStatus;
|
|
486
496
|
|
|
497
|
+
readonly region?: string | null;
|
|
498
|
+
|
|
487
499
|
stream(name: string): SessionStream;
|
|
488
500
|
|
|
489
501
|
doc(key: string): SessionDocument;
|
|
@@ -494,6 +506,8 @@ interface Session {
|
|
|
494
506
|
|
|
495
507
|
touch(): void;
|
|
496
508
|
|
|
509
|
+
activity?(): void;
|
|
510
|
+
|
|
497
511
|
request(payload: unknown, options?: RequestOptions): Promise<unknown>;
|
|
498
512
|
|
|
499
513
|
requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
|
|
@@ -667,13 +681,19 @@ interface AttachOptions {
|
|
|
667
681
|
authProvider?: string;
|
|
668
682
|
|
|
669
683
|
functionsUrl?: string;
|
|
684
|
+
|
|
685
|
+
activity?: ActivitySignalMode;
|
|
670
686
|
}
|
|
671
687
|
|
|
688
|
+
type ActivitySignalMode = 'auto' | 'explicit';
|
|
689
|
+
|
|
672
690
|
interface StartSessionOptions {
|
|
673
691
|
|
|
674
692
|
sessionId?: string;
|
|
675
693
|
|
|
676
694
|
label?: string;
|
|
695
|
+
|
|
696
|
+
activity?: ActivitySignalMode;
|
|
677
697
|
}
|
|
678
698
|
|
|
679
699
|
interface App {
|
|
@@ -695,6 +715,8 @@ interface SessionGatewayResponse {
|
|
|
695
715
|
location?: string;
|
|
696
716
|
|
|
697
717
|
session_api_base?: string;
|
|
718
|
+
|
|
719
|
+
serving_region?: string | null;
|
|
698
720
|
request_id?: string;
|
|
699
721
|
session_id?: string;
|
|
700
722
|
ws_url?: string;
|
|
@@ -749,6 +771,8 @@ interface AdmissionUpdate {
|
|
|
749
771
|
refusalSource?: string;
|
|
750
772
|
|
|
751
773
|
refusalMessage?: string;
|
|
774
|
+
|
|
775
|
+
region?: string | null;
|
|
752
776
|
}
|
|
753
777
|
interface AllocateSessionOptions {
|
|
754
778
|
baseUrl: string;
|
|
@@ -1390,9 +1414,13 @@ declare class TransportSession {
|
|
|
1390
1414
|
|
|
1391
1415
|
setEndsAt(endsAt: Date | null): void;
|
|
1392
1416
|
|
|
1417
|
+
seedRegion(region: string | null | undefined): void;
|
|
1418
|
+
|
|
1393
1419
|
private _pastDeadline;
|
|
1394
1420
|
|
|
1395
1421
|
get status(): SessionStatus;
|
|
1422
|
+
|
|
1423
|
+
get region(): string | null | undefined;
|
|
1396
1424
|
get sessionId(): string | null;
|
|
1397
1425
|
get tracks(): Map<string, MediaStreamTrack>;
|
|
1398
1426
|
get multiplexer(): ChannelMultiplexer | null;
|
|
@@ -1609,6 +1637,10 @@ declare class SessionDocumentImpl implements SessionDocument {
|
|
|
1609
1637
|
|
|
1610
1638
|
ensureConnected(): void;
|
|
1611
1639
|
|
|
1640
|
+
reconnect(): void;
|
|
1641
|
+
|
|
1642
|
+
disconnect(): void;
|
|
1643
|
+
|
|
1612
1644
|
onConnectionState(handler: (state: DocConnectionState) => void): () => void;
|
|
1613
1645
|
|
|
1614
1646
|
onSynced(handler: () => void): () => void;
|
|
@@ -1675,4 +1707,4 @@ interface DataChannelTransport {
|
|
|
1675
1707
|
|
|
1676
1708
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
1677
1709
|
|
|
1678
|
-
export { type
|
|
1710
|
+
export { type ReleaseSessionBeaconOptions as $, type AccessTokenOptions$1 as A, type GenerationTick as B, type ChannelEndpoint as C, DERIVED_LEG_SEP as D, type MediaChunkSource as E, type MediaChunkSourceFactory as F, GENERATION_TICK_EMIT_INTERVAL_MS as G, type MediaRecorderChunkSourceOptions as H, type InboundStatsSample as I, type MediaSession as J, type NegotiatorOptions as K, LoopbackStreamData as L, type MediaChunkBinding as M, type NegotiatorDataLaneSeam as N, type PathLiveness as O, type PathHealthReporting as P, type Presence as Q, type PresenceState as R, type PrewakeOptions as S, type PrewakeResult as T, type PrewakeStatus as U, type QuicStreamDataTransport as V, type Recording as W, type RecordingBucket as X, type RecordingLifecycle as Y, type RecordingStatus as Z, type RecordingsAccessor as _, type AccessTokenOptions as a, encodeStreamEnvelope as a$, type RequestOptions as a0, type RequestStreamOptions as a1, type RuntimeArtifact as a2, type RuntimeArtifactDownload as a3, type RuntimeArtifactsAccessor as a4, type RuntimeAvailability as a5, type RuntimeWakeDetail as a6, type RuntimeWakeGolden as a7, type RuntimeWakeReasonCode as a8, SIGNALING_PROTOCOL_VERSION as a9, type TransportOfferRequest as aA, type TransportOfferResponse as aB, TransportSession as aC, type TransportSessionOptions as aD, TransportSessionSignaling as aE, type TransportState as aF, type VideoPlayoutOptions as aG, WT_CONTROL_FRAME_MAX as aH, WT_DATA_STREAM_VERSION as aI, type WatchGenerationTickOptions as aJ, type WtAudioLaneSeam as aK, type WtAudioUplinkSeam as aL, WtControlDecoder as aM, type WtControlMessage as aN, type WtDataEnvelope as aO, type WtDataLaneSink as aP, WtDataStreamParser as aQ, WtDataUplinkSender as aR, type WtVideoUplinkSeam as aS, allocateSession as aT, consumeWtDataStreams as aU, createPresence as aV, createWebsocketDocConnector as aW, decodeStreamEnvelope as aX, deriveYjsServerUrl as aY, derivedLegName as aZ, derivedLegRole as a_, STREAM_END as aa, type Session as ab, type SessionDiagnostic as ac, type SessionDirectoryRequestOptions as ad, type SessionDocument as ae, SessionDocumentImpl as af, type SessionEndResult as ag, type SessionFailureKind as ah, type SessionPhase as ai, type SessionPhaseError as aj, type SessionPhaseName as ak, type SessionStartOptions as al, type SessionStatsOptions as am, type SessionStatsSample as an, type SessionStatus as ao, type SessionStream as ap, type SessionText as aq, type SignalCarrier as ar, type Signaling as as, type StartSessionOptions as at, type Store as au, type StoreOptions as av, type StreamChunkOptions as aw, type StreamDataTransport as ax, type TransportEstablishedNotify as ay, TransportNegotiator as az, type ActivationEvent as b, encodeWtControlFrame as b0, isPendingRecording as b1, mediaRecorderChunkSource as b2, parseDgramHeader as b3, prewake as b4, releaseSessionBeacon as b5, streamDataLabel as b6, transportStreamData as b7, watchGenerationTick as b8, writeDgramHeader as b9, type ActivationState as c, type ActivitySignalMode as d, type AllocateSessionOptions as e, type AllocatedSession as f, type App as g, type AppOptions as h, type AttachOptions as i, type AudioPlayoutOptions as j, type ChannelMessage as k, ChannelMultiplexer as l, type ChannelName as m, type ChunkReadable as n, DGRAM_HEADER_BYTES as o, DOC_SYNC_WIRE_CONTRACT_VERSION as p, DeferredChannelMultiplexer as q, DeferredDocConnector as r, type DerivedLegRole as s, type DgramHeader as t, type DocConnection as u, type DocConnectionState as v, type DocConnector as w, type DocServerUrlResolver as x, type DocTokenSupplier as y, GENERATION_TICK_MAX_EXTRAPOLATION_MS as z };
|